variable index to many matrices

1 view (last 30 days)
Hi,
Can we have one variable referring to more than one matrix. Like B(1)=[1 2;3 4] and B(2)=[7 8 9;4 5 6]...etc
what is the best way to have many matrices of different sizes and have just one variable referring to all of them through index or any other way.
Thank you

Accepted Answer

per isakson
per isakson on 16 Oct 2015
Edited: per isakson on 16 Oct 2015
The answer is Cell Array
B{1}=[1 2;3 4];
B{2}=[7 8 9;4 5 6];

More Answers (0)

Community Treasure Hunt

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

Start Hunting!