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

3 vues (au cours des 30 derniers jours)
kanako machii
kanako machii le 28 Juil 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; )
宜しくお願い致します。

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!