How can I create arrays with different names using loop?

조회 수: 9 (최근 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 CenterFile 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