if statement - Simple code on Octave -
in case u
vector of random numbers
i=u if (i<1) i=i+1 endif endfor
in end gives me vector i=u
if trying count number of elements less 1 then:
sum(u < 1)
or if wanted use loop need separate variable total:
count = 0 = u if < 1 count = count+1; end end
Comments
Post a Comment