comparison talk/code/showalgo.m @ 69:456e3f722147

showalgo: fix handling of the jackpot casex
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 18 May 2016 21:44:38 -0400
parents 5510ac95a3d3
children 430f958f007c
comparison
equal deleted inserted replaced
68:5510ac95a3d3 69:456e3f722147
19 graphics_toolkit fltk; 19 graphics_toolkit fltk;
20 figure 20 figure
21 pause 21 pause
22 22
23 for iter = 1:length(Am) 23 for iter = 1:length(Am)
24 if iter > rows(L)
25 break
26 endif
27
24 ## Reset the image 28 ## Reset the image
25 imgH = origH; 29 imgH = origH;
26 30
27 ## Make greater-than red 31 ## Make greater-than red
28 red = imgH(:,:,1); 32 red = imgH(:,:,1);
43 imgH(i,j,1) = imgH(i,j,2) = 1; 47 imgH(i,j,1) = imgH(i,j,2) = 1;
44 imgH(i,j,3) = 0; 48 imgH(i,j,3) = 0;
45 49
46 imshow(imgH); 50 imshow(imgH);
47 pause 51 pause
48
49 if iter == length(Am)
50 break;
51 endif
52 52
53 ## Check the left side 53 ## Check the left side
54 imgLeft = imgH; 54 imgLeft = imgH;
55 red = imgH(:, :, 1); 55 red = imgH(:, :, 1);
56 green = imgH(:, :, 2); 56 green = imgH(:, :, 2);