Call a matrix in a matrix

6 visualizzazioni (ultimi 30 giorni)
Ellen
Ellen il 3 Feb 2014
Commentato: Ellen il 3 Feb 2014
Can you define a matrix A (3x6) consisting of matrices B (3x3) and C (3x3) and then call these in such a way that
A = [ B ; C ]
A (1) = B and A (2) = C
Or will you always have to write A(1:3,:) to get B?

Risposta accettata

Amit
Amit il 3 Feb 2014
Modificato: Amit il 3 Feb 2014
You can have cell like this:
B = rand(3);
C = rand(3);
A{1} = B;
A{2} = C;

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by