Info

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

cell of matrixes to cell of array

1 回表示 (過去 30 日間)
jack
jack 2015 年 11 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi,
I need your help in solving the following problem:
How can I convert a cell of matrixes to cell of arrays?
As an example, refer to the following image:
Thanks in advance.
  1 件のコメント
James Tursa
James Tursa 2015 年 11 月 25 日
Please give a short example of your cell of matrices and your desired cell of arrays output.

回答 (2 件)

Batool Engineer
Batool Engineer 2015 年 11 月 25 日
Try this:
clc
c1=[1,2,3;1,2,3;1,2,3]
c2=[4,5,6;4,5,6;4,5,6]
newc1=reshape(c1,9,1)
newc2=reshape(c2,9,1)

James Tursa
James Tursa 2015 年 11 月 25 日
newC = cell(size(C));
for k=1:numel(C)
M = C{k}';
newC{k} = M(:);
end

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

Community Treasure Hunt

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

Start Hunting!

Translated by