i would like to get all values of for loop outside loop,but this program gives me the last value only
2 views (last 30 days)
Show older comments
Sagar AS
on 4 Jul 2015
Answered: Walter Roberson
on 4 Jul 2015
for i=1:5
x(i)=i+1;
end
disp(x(i));
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Numeric Types 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!