Concatenate vectors stored in cell array

1 ビュー (過去 30 日間)
Lennart Zielstra
Lennart Zielstra 2022 年 9 月 22 日
編集済み: Matt J 2022 年 9 月 22 日
Dear all,
Currently, I am working on storing real-time data in a cell array. My current method appends the new data to the cell array after it has been collected. Each cell contains a 3x1 vector. Now I would like to concatenate these cells such that I acquire a 3xn (n = amount of iterations) matrix. To be more exact. Now I have a cell of 27 * 100 (with n=100) and I would like to acquire a cell of 27 * 1 with each element containing a matrix of 3 * 100.
Thanks in advance

採用された回答

Matt J
Matt J 2022 年 9 月 22 日
編集済み: Matt J 2022 年 9 月 22 日
cell2mat( reshape( yourCell.' ,1,[],27) )

その他の回答 (0 件)

カテゴリ

Find more on Cell Arrays in Help Center and File Exchange

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by