saving topologies in matrix

3 views (last 30 days)
JaeSung Choi
JaeSung Choi on 28 Dec 2017
Commented: JaeSung Choi on 10 Jan 2018
I want to save my topology in matrix.
For example if i have 100 kinds of 1000 by 1000 matrix(topology)
then i want to save this topologies in some matrix matrix B?
I tried this as following.
A1 = eye(1000,1000);
B = zeros(10,10);
B(1,1) = A;
Of course, it didn't work. Please help me how can i do this!

Accepted Answer

Joe Murphy
Joe Murphy on 2 Jan 2018
Hello JaeSung,
In this situation, I would suggest the usage of cell arrays to store your 1000 by 1000 matrices (topologies). You can first initialize the cell array 'B' using the code below:
B = cell(10,10);
Afterwards, you can assign data to the cell array using cell array syntax:
A1 = eye(1000,1000);
B{1,1} = A1;
You can then also access the cell array data using the same syntax:
disp(B{1,1});
You can read more about cell arrays in the documentation page below:
https://www.mathworks.com/help/matlab/ref/cell.html
  1 Comment
JaeSung Choi
JaeSung Choi on 10 Jan 2018
I'm sorry for late accepting ( Actually I just forgot accepting). Really thanks!

Sign in to comment.

More Answers (0)

Categories

Find more on 행렬과 배열 in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!