フィルターのクリア

combine values from struct.

3 ビュー (過去 30 日間)
FV
FV 2020 年 5 月 5 日
コメント済み: Stephen23 2020 年 5 月 6 日
I have a struct of 1x30 and every struct have a large double every one different but same number of columns.
I want the values from all the doubles to form one matrix. How can I do that?
  2 件のコメント
FV
FV 2020 年 5 月 5 日
Something faster than this.
A=[B(1).SmallerB;B(2).SmallerB;B(3).SmallerB;B(4).SmallerB;B(5).SmallerB;.........];

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

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 5 日
編集済み: Ameer Hamza 2020 年 5 月 5 日
See vertcat(). Run this example
s1(1).a = [1 2 3];
s1(2).a = [4 5 6; 7 8 9];
s1(3).a = [1 2 3; 4 5 6; 7 8 9];
vertcat(s1.a)
Result
ans =
1 2 3
4 5 6
7 8 9
1 2 3
4 5 6
7 8 9

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by