Info

This question is closed. Reopen it to edit or answer.

facing the problem in line no.... F(j)>0.0 in this loop

1 view (last 30 days)
if F(j)>0.0
a=rand();
if a>0.5
w=1;
else
w=0;
end
if w==1
i=i+1;
sel1(i)=j;
m1(i)=sel1(i);
F(j)=F(j)-1;
else
end
else
end
end
end
  1 Comment
John D'Errico
John D'Errico on 14 Apr 2017
What problem?
I do wonder why you think EVERY if statement must have a blank else clause. But that is not at all relevant. You also have far more end statements in this code to ever run.
If you have an error message, then give us the ENTIRE text of the message, not just part of the message. Provide the complete error as generated.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!