How can I create arrays with different names using loop?

10 Ansichten (letzte 30 Tage)
Kiryl Zhaliazka
Kiryl Zhaliazka am 31 Mär. 2022
Bearbeitet: James Tursa am 31 Mär. 2022
I want to create n=1:56 arrays with names a(n), and each array contein random number.
thank you.

Antworten (1)

James Tursa
James Tursa am 31 Mär. 2022
Bearbeitet: James Tursa am 31 Mär. 2022
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:

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by