What is wrong?
for n=1:1000 while n<1000 if sin(n)>0.5 s(n)=sin(n); n=n+1; else n=n+1; endendendL=length(s);disp(L)
for loopif statementwhile loop
for n=1:1000 while n<1000 if sin(n)>0.5 s(n)=sin(n); n=n+1; else n=n+1; endendendL=length(s);disp(L)
Best Answer