convertion N matrixs inside a cell into one array

1 回表示 (過去 30 日間)
neamah al-naffakh
neamah al-naffakh 2017 年 1 月 10 日
回答済み: neamah al-naffakh 2017 年 1 月 10 日
I have a cell called ( AA ) that contains 1 row * 36 columns (as shown in the attached image)
As we could see that each column in that cell is a matrix ( inside each column there are 1*3 data points )
I need to have an array that has 36 Rows * 3 columns
For example,
the first column in the Cell will be converted into 1 Row and three columns, the second column in the Cell will be converted in the same way and finally add all of them together in order to generate an array that contains 36 Rows and 3 Columns
Here is a simple example
-1.48247427405830e-15 0.185513882360673 -0.185513882360676
-9.59200039657764e-16 0.211729497802758 -0.211729497802760
3.69087930153418e-16 0.224791092084074 -0.224791092084073

採用された回答

Walter Roberson
Walter Roberson 2017 年 1 月 10 日
編集済み: Walter Roberson 2017 年 1 月 10 日
cell2mat(AA(:))
or, more simply,
vertcat(AA{:})
  1 件のコメント
neamah al-naffakh
neamah al-naffakh 2017 年 1 月 10 日
thank you so much for your help
by the way this is another method as well
output = cat(1, AA{:})

サインインしてコメントする。

その他の回答 (1 件)

neamah al-naffakh
neamah al-naffakh 2017 年 1 月 10 日
in addition to the answer of the gentleman Walter Roberson
this is another answer that we can use it as well
output = cat(1, AA{:})

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by