Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to combine cells inside a cell array of cells to only 2 levels cellarray?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156379/image.png)
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 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!