How to put a matrix into an cell element?
Ältere Kommentare anzeigen

Hi everyone,
I have a cell array called inputs2 with 7 coloumns and 10001 rows. I want to be able to take each row entry and combine it to a single matrix and put that into a cell array like shown below.

% So like this
[0.8668;0.3571;0.2254;0.7989;0.4415;0.1627;0.3671] in the first cell and so on [..;..;..;..;..;..;..;]... for the 10001 entries.
Akzeptierte Antwort
Weitere Antworten (1)
Kevin Phung
am 4 Mär. 2019
new_M = cell(1,size(inputs2,1));
for i = 1:size(inputs2,1)
new_M{i} = inputs2{1}(i,:)
end
1 Kommentar
Akash Menon
am 5 Mär. 2019
Bearbeitet: Akash Menon
am 5 Mär. 2019
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
