I want to build a structure that includes multiple matrices

3 ビュー (過去 30 日間)
John Hunt
John Hunt 2017 年 10 月 14 日
回答済み: Stephen23 2017 年 10 月 14 日
I want to build about 100 matrices that are just zeros that have three columns and one row.
I then want to populate these matrices with positions for a point that fits the criteria of each matrix (making the matrix start at 1 row to however many it ends up with).
how can I do that?

回答 (1 件)

Stephen23
Stephen23 2017 年 10 月 14 日
A cell array would be simpler than a structure:
>> C = num2cell(zeros(100,3),2);
>> C{1}
ans =
0 0 0
>> C{2}
ans =
0 0 0
etc

カテゴリ

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