how can i pass the values to an array?

1 次查看(过去 30 天)
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?

采纳的回答

Star Strider
Star Strider 2015-9-22
编辑:Star Strider 2015-9-22
Change the ‘j’ assignment to:
j(i) = i*5;

更多回答(1 个)

Image Analyst
Image Analyst 2015-9-22
Or get rid of the "for":
i=1:10;
j=i*5;

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by