Info

この質問は閉じられています。 編集または回答するには再度開いてください。

splitting uneven matrx in to two parts

1 回表示 (過去 30 日間)
PK
PK 2013 年 6 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
using mat2cell we can convert a big array in different cells but all are stored in a single variable as double matrices so how can we assign them to seperate variables......ie., we split A=140x13 matrix in to 100x13 and 40x13 with A0=mat2cell(A,[100,40]) command it will be stored as [100x13 double] [ 40x13 double] cells in the same variable ,,,so after splitting how can we pin 100x13 and 40x13 to two different variables

回答 (1 件)

Image Analyst
Image Analyst 2013 年 6 月 29 日
Then try this:
A = randi(9, [140, 13]);
A0=mat2cell(A,[100,40])
topRows = A0{1};
bottomRows = A0{2};
% Or even better
topRows2 = A(1:100, :);
bottomRows2 = A(101:end,:);

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by