how to give range of values to variable
21 views (last 30 days)
Show older comments
please tell me how to code below statments.
for i from 0 to 255
s[i]:=i
0 Comments
Answers (2)
Walter Roberson
on 25 Feb 2016
for i = 0 : 255
s(i+1) = i;
end
Or
s = 0 : 255; %no loop needed
2 Comments
See Also
Categories
Find more on Loops and Conditional Statements 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!