필터 지우기
필터 지우기

how to save iterations obtained from mat2cell?

조회 수: 2 (최근 30일)
Lucrezia Cester
Lucrezia Cester 2021년 2월 13일
답변: KALYAN ACHARJYA 2021년 2월 13일
I have a cell array A made up of matrices that I want to split up so I do this loop
for i = 1:numel(A)
B= mat2cell( A{i},[1],[3666 3666 3666 3666 3666 3666])
end
where i =9 and the result of each of the 9 iterations is a 1x6 cell, repeated 9 times.
However this only saves the last iteration of 1x6, but not the other 8 times it went trough the loop.
How can I save every iteration in a cell?
Cheers and thanks.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021년 2월 13일
"how to save iterations obtained from mat2cell?"
You can save cells within a another cell, as B
B=cell(1,numel(A))
for
B{i}=
end

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by