what is the meaning of this code
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
praveen singathi
am 20 Mär. 2021
Kommentiert: praveen singathi
am 20 Mär. 2021
for i=1:1:n
M(:,i)=ca{i}(:);
end
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 20 Mär. 2021
ca is a cell array. The first n entries of the cell array are to be reshaped into vectors and stored as columns of M. You would get an error if the number of elements in each entry is not the same.
In some cases, the code could be replaced with a call to cell2mat(), depending on what the shape of the entries is.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!