how can i put multiple matrices into a struct?

13 visualizaciones (últimos 30 días)
Mio Rinnovo
Mio Rinnovo el 2 de Nov. de 2019
Comentada: Mio Rinnovo el 2 de Nov. de 2019
Can add multiple matrices into one struct?

Respuesta aceptada

David Hill
David Hill el 2 de Nov. de 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 comentario
Mio Rinnovo
Mio Rinnovo el 2 de Nov. de 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?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by