次元の異なるセルを配​列に変換する方法を教​えてください

6 Ansichten (letzte 30 Tage)
kanako machii
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; )
宜しくお願い致します。

Akzeptierte Antwort

Shunichi Kusano
Shunichi Kusano am 28 Jul. 2020
列ごとにcell2matでしょうか。
mat = cell(1,3);
for i=1:3
mat{i} = cell2mat(X(:,i));
end

Weitere Antworten (0)

Kategorien

Mehr zu データ型の変換 finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!