MATLAB: How can i pass the values to an array

arrayprogramming

for i=1:10
j=i*5:
end
output will be:
5,
10,
......
50.
how can i pass these output values(5…..50) in an array?

Best Answer

Change the ā€˜jā€™ assignment to:
j(i) = i*5;