how can i put multiple matrices into a struct?

12 vues (au cours des 30 derniers jours)
Mio Rinnovo
Mio Rinnovo le 2 Nov 2019
Commenté : Mio Rinnovo le 2 Nov 2019
Can add multiple matrices into one struct?

Réponse acceptée

David Hill
David Hill le 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 commentaire
Mio Rinnovo
Mio Rinnovo le 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?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Structures 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