loop to assign an array to a string and the create a structure array
4 ビュー (過去 30 日間)
古いコメントを表示
field_1 = 'Response_1'
field_2 = 'Response_2'
field_3 = 'Response_3'
field_4 = 'Response_4'
field_5 = 'Response_5'
field_6 = 'Response_6'
field_7 = 'Response_7'
field_8 = 'Response_8'
field_9 = 'Response_9'
field_10 = 'Response_10'
field_11 = 'Response_11'
field_12 = 'Response_12'
field_13 = 'Response_13'
field_14 = 'Response_14'
field_15 = 'Response_15'
field_16 = 'Response_16'
field_17 = 'Response_17'
field_18 = 'Response_18'
field_19 = 'Response_19'
field_20 = 'Response_20'
s = struct(field_1,FR_1(:,2),....
filed_20,FR_20(:,2))
How can I create a loop to assign an array (Response_1 to Response_20) to a string (field_1 to field_20) and then create another loop to create a structure array (s) that contains Response_1 to Response_20?
1 件のコメント
Stephen23
2019 年 7 月 30 日
Why not just use indexing?
Indexing would be much simpler and much more efficient that what you are trying to do.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!