How can I create arrays with different names using loop?

10 vues (au cours des 30 derniers jours)
Kiryl Zhaliazka
Kiryl Zhaliazka le 31 Mar 2022
Modifié(e) : James Tursa le 31 Mar 2022
I want to create n=1:56 arrays with names a(n), and each array contein random number.
thank you.

Réponses (1)

James Tursa
James Tursa le 31 Mar 2022
Modifié(e) : James Tursa le 31 Mar 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:

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by