how can i pass the values to an array?

5 ビュー (過去 30 日間)
Muhammad Umer
Muhammad Umer 2015 年 9 月 22 日
コメント済み: Star Strider 2015 年 9 月 22 日
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;
  2 件のコメント
Muhammad Umer
Muhammad Umer 2015 年 9 月 22 日
thanks
Star Strider
Star Strider 2015 年 9 月 22 日
My pleasure.

サインインしてコメントする。

その他の回答 (1 件)

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

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by