how to asign 2 dimesion array to 3 dimension array if it is not possible then how can i assign each 2 dimension array to 3 dimension array in for loop

how to asign 2 dimesion array to 3 dimension array if it is not possible then how can i assign each 2 dimension array to 3 dimension array in for loop

 Réponse acceptée

One element of an array can contain one element only. This is the definition of "element".
Perhaps you are looking for a cell:
A{1} = [1 3 5];
A{2} = [5 8 11];
B{1} = [1, 3, 5; 5, 8, 11];
These basics are explained exhaustively in the "Getting Started" chapters of the documentation.

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by