how can i put multiple matrices into a struct?

 Accepted Answer

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 Comment

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?

Sign in to comment.

More Answers (0)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!