フィルターのクリア

Convert structure to vector

85 ビュー (過去 30 日間)
Gina Torres
Gina Torres 2018 年 7 月 9 日
コメント済み: Gina Torres 2018 年 7 月 9 日
Hello all,
I'm working with data in a structure type. For example:
M(1).vector=[0.3966;0.0829]
M(2).vector=0.87537
M(3).vector=0.64707
M(4).vector=[0.50874;0.04913;0.39537;0.27546;0.5889;0.61199;0.61578;0.78747;0.75151]
The Data for each row within the structure are small vectors as shown (Actually my structure has more than 1000 rows). I have this information separated like this because to each row I needed to apply different calculations. But now that all the calculations are done, I want to have this data as a 1 column vector. I have tried using something like cell2mat(struct2cell(M)) but I get errors.
The result that I'm looking for should look like this:
Result=[0.3966;0.0829;0.87537;0.64707;0.50874;0.04913;0.39537;0.27546;0.5889;0.61199;0.61578;0.78747;0.75151]
Any suggestions?

採用された回答

Adam
Adam 2018 年 7 月 9 日
vertcat( M.vector )
  1 件のコメント
Gina Torres
Gina Torres 2018 年 7 月 9 日
Thank you!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by