how can i put multiple matrices into a struct?

13 visualizzazioni (ultimi 30 giorni)
Can add multiple matrices into one struct?

Risposta accettata

David Hill
David Hill il 2 Nov 2019
A and B are maxtrixes of any size.
m=struct('matrix',{A,B});
struct field is 'matrix', so m(1).matrix == A and m(2).matrix == B.
  1 Commento
Mio Rinnovo
Mio Rinnovo il 2 Nov 2019
Thanks!
So plugging in m(1).matrix in the command window will show me A, but what if A is also a struct with 2 matrices in them?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Structures 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