Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Nimrod
Nimrod le 15 Sep 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
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?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by