{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

randInteger - a_random_integer=a_random_integer-1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%randInteger.m TEST SETS=10 PIXEL=100; RANDOM_INTS=zeros(i,1); random_ints=zeros(i,1); RANDOM_PIXEL=zeros(PIXEL,1); for n=1:i a_random_integer=randint(1,1,[1,PIXEL]); random_ints(n,1)=a_random_integer; random_integer=0; iteration=1; while a_random_integer>0 random_integer=random_integer+1; if RANDOM_PIXEL(iteration,1)~=-1;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a_random_integer=a_random_integer-1; end %RANDOM_INTS(n,1)=a_random_integer; iteration=iteration+1; end RANDOM_INTS(n,1)=random_integer; RANDOM_PIXEL(random_integer,1)=-1; PIXEL=PIXEL-1; end %---------------------------------------------...
View Full Document

{[ snackBarMessage ]}