how can i put multiple matrices into a struct?

13 次查看(过去 30 天)
Can add multiple matrices into one struct?

采纳的回答

David Hill
David Hill 2019-11-2
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 个评论
Mio Rinnovo
Mio Rinnovo 2019-11-2
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?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by