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

6 views (last 30 days)
kanako machii
kanako machii on 28 Jul 2020
Answered: Shunichi Kusano on 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; )
宜しくお願い致します。

Accepted Answer

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

More Answers (0)

Categories

Find more on データ型の変換 in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!