How can I create arrays with different names using loop?

11 ビュー (過去 30 日間)
Kiryl Zhaliazka
Kiryl Zhaliazka 2022 年 3 月 31 日
編集済み: James Tursa 2022 年 3 月 31 日
I want to create n=1:56 arrays with names a(n), and each array contein random number.
thank you.

回答 (1 件)

James Tursa
James Tursa 2022 年 3 月 31 日
編集済み: James Tursa 2022 年 3 月 31 日
Don't embed numbering into the variable names. This will make the variables hard to use downstream in your code. Use cell arrays or multidimension arrays etc. instead. See this discussion:

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by