How to save portfolio objects to an array?
古いコメントを表示
p = Portfolio;
c = Portfolio;
d = [p c]
How do i store objects in an array and then extract any specific object from that array? I want to do this.
d.p.BuyCost
Thanks.
1 件のコメント
dpb
2022 年 10 月 8 日
Indexing; don't compound-nest similar structs; that will become totally unworkable.
d(2).BuyCost
You can create an associated name array to use as id if want a way to find specific element of the array or add that ID as a field.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Specify Portfolio Constraints についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!