update the filed values in a structure
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, i have a structure which has the number of field values depending on the blobs it identifies. But, in some the frames, i run my algorithm to identify hidden blobs. Now, i need to update the field of my structure with the values of newly found blobs. eg if i have a field named "Area" and i find that its values in a certain frame are 34,36,40,39 and in another frame i find that 34,36,79. This means that the 78 blob is combined with 2 blobs. So my algorithm separates the blobs but now i need to update my structure with the new values.
Any help would be highly appreciated.
0 件のコメント
回答 (1 件)
Wayne King
2012 年 10 月 21 日
編集済み: Wayne King
2012 年 10 月 21 日
You can access the field with
mystruct.Area
So why can't you just update the field
mystruct = struct('Area',[34 36 40 39]);
mystruct.Area = [34 36 79];
If the problem is more involved than that, please include a small code example to illustrate the error.
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!