How can I create arrays with different names using loop?

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:

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by