次元の異なるセルを配列に変換する方法を教えてください
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
kanako machii
il 28 Lug 2020
Risposto: Shunichi Kusano
il 28 Lug 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 Commenti
Risposta accettata
Shunichi Kusano
il 28 Lug 2020
列ごとにcell2matでしょうか。
mat = cell(1,3);
for i=1:3
mat{i} = cell2mat(X(:,i));
end
0 Commenti
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!