필터 지우기
필터 지우기

saving topologies in matrix

조회 수: 2 (최근 30일)
JaeSung Choi
JaeSung Choi 2017년 12월 28일
댓글: JaeSung Choi 2018년 1월 10일
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!

채택된 답변

Joe Murphy
Joe Murphy 2018년 1월 2일
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
JaeSung Choi
JaeSung Choi 2018년 1월 10일
I'm sorry for late accepting ( Actually I just forgot accepting). Really thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!