How to associate a rectangle with a struct?
古いコメントを表示
Hi there Community,
I have the folllowing image and the antenna:
[Horizontal,Vertical,Optional] = msiread(strcat(pathName,fileName));

How can I associate a rectangle to an antenna?
I made the rectangle using:
rectangle('Position', [(x - handles.Rwidth/2) (y - handles.Rwidth/2)...
handles.Rwidth handles.Rheight], 'FaceColor', 'g','LineStyle', 'none');
Is it possible to affect the rectangule with the struct (antenna)?
10 件のコメント
Walter Roberson
2020 年 8 月 5 日
Could you explain more what you mean by "associate" ?
Are you asking for some image processing to locate the yellow blobs, calculate the centroids, and then use those centroids as the locations to place antennae ?
Adam Danz
2020 年 8 月 5 日
My guess is that you want to change the position of the rectangle according to some other object on the plot. Changing the position of an existing rectangle can be done by changing its position property.
h = rectangle('Position', [1 2 3 4]);
% change position
h.Position = [2 3 4 5];
Walter Roberson
2020 年 8 月 5 日
I see that you edited your question, but unfortunately I do not know what you mean by "affect the rectangle with the struct (antenna)" ??
Oliver Lestrange
2020 年 8 月 6 日
Walter Roberson
2020 年 8 月 6 日
Are you asking for some image processing to locate the yellow blobs, calculate the centroids, and then use those centroids as the locations to place antennae ?
Oliver Lestrange
2020 年 8 月 6 日
Adam Danz
2020 年 8 月 6 日
If you plotted the yellow squares, then you know their positions. Use the positions to keep track of where the yellow squares are. The problem is still not clear.
Oliver Lestrange
2020 年 8 月 6 日
Adam Danz
2020 年 8 月 6 日
Oliver Lestrange
2020 年 8 月 6 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Read, Write, and Modify Image についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
