次元の異なるセルを配列に変換する方法を教えてください
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
kanako machii
am 28 Jul. 2020
Beantwortet: Shunichi Kusano
am 28 Jul. 2020
次元の異なるセルを結合して配列(行列)に変換する方法はありますか?
例えば、X =
{1×2 double} {1×2 double} {1×2 double}
{2×2 double} {1×2 double} {1×2 double}
{3×2 double} {1×2 double} {2×2 double}
のセルを列ごとに垂直に結合して配列に変換したいです。(一番右 A =1×2; 2×2; 3×2; )
宜しくお願い致します。
0 Kommentare
Akzeptierte Antwort
Shunichi Kusano
am 28 Jul. 2020
列ごとにcell2matでしょうか。
mat = cell(1,3);
for i=1:3
mat{i} = cell2mat(X(:,i));
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!