why this code is not running ? the workspace remains empty.
Show older comments
m = zeros(1,163);
count = 1;
flag= 0;
while 1
r = randi([1,326]);
for i = 1:1:count
if(m(1,i)==r)
flag = 1;
end
end
if(flag==0)
m(1,count)=r;
count=count+1;
end
if(count==163)
break;
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!