필터 지우기
필터 지우기

Info

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

How to combine cells inside a cell array of cells to only 2 levels cellarray?

조회 수: 1 (최근 30일)
Nimrod
Nimrod 2016년 9월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
spectra = rand([200, 999999]);
Xcell = mat2cell(spectra, 200, ones(1, 999999));
Xcell(1, [200:295:305045]) = {NaN}; % just adding NaNs in random locations to simulate the reality
[~, edges] = histcounts(1:999999, 129);
edges(end) = 999999;
Xv = cell(1, 128);
for i = 1:128
Xv{1, i} = Xcell(1, edges(i)+1:edges(i+1))
end
Ok. Now I have this Xcell cell array, containing 128 cellarrays, containing a few hundreds cell arrays each, some are with NaNs and some are with spectra. allso important to know that the 128th cell array is smaller than the rest.
At this point i do all sort of things to manipulate my data, and later i want to transform my data into one cell array containing 999999 cell arrays (like in Xcell).
How can i do it?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by