# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1463609182 14400 # Node ID 5510ac95a3d39fd4d94df8aa9561086ba968a452 # Parent 1aa38f4846e022cdbd04d6753573e659ce115705 last minute fixes diff --git a/talk/code/show_mc.py b/talk/code/show_mc.py --- a/talk/code/show_mc.py +++ b/talk/code/show_mc.py @@ -19,7 +19,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +import sys import numpy as np @@ -261,7 +261,11 @@ def main(): - data = np.random.uniform(size=26) + if len(sys.argv) < 2: + print "Need a size" + exit(1) + + data = np.random.uniform(size=int(sys.argv[1])) mc = medcouple_1d(data) with open("mc", "w") as f: diff --git a/talk/code/showalgo.m b/talk/code/showalgo.m --- a/talk/code/showalgo.m +++ b/talk/code/showalgo.m @@ -16,6 +16,10 @@ origH = repmat((H+1)/2, 1, 1, 3); +graphics_toolkit fltk; +figure +pause + for iter = 1:length(Am) ## Reset the image imgH = origH; @@ -94,10 +98,17 @@ [i,j] = find(Am(iter) == H); imgH(i,j,1) = imgH(i,j,2) = 1; imgH(i,j,3) = 0; - - printf("rank is between %d and %d (target: %d)\n", - Ptot(iter), Qtot(iter), medc_idx) imshow(imgRight); pause + imshow(imgH); + printf("rank is between %d and %d (target: %d)\n", + Ptot(iter), Qtot(iter), medc_idx) + pause + endfor + +if (jackpot) + printf("Jackpot!\n") +endif +pause