Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

cell data into different doubles

조회 수: 2 (최근 30일)
Huseyin
Huseyin 2016년 12월 14일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi, I have 5x1 cell named 'b'. I want to extract the data into different matrices like; b1=b{1} b2=b{2} b3=b{3} b4=b{4} b5=b{5}
But I want to do it by using for loop because the size of cell may differ for different inputs in the algorithm. If you help me I would be very glad. Thanks

답변 (1개)

Chinmay Anand
Chinmay Anand 2019년 6월 28일
[row,col] = size(A); % row and col containing size of A ( A is the cell matrix )
for i=1:row
for j=1:col
mat = A{i,j}; % storing matrix in mat variable
end
end
You can store each matrix ( in the cell ), just keep on changing the variable named mat.

Community Treasure Hunt

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

Start Hunting!

Translated by