リアルタイムに変化する変数への代入値を記録する方法
이전 댓글 표시
こんにちは。
以下のコードについて質問があります。
for object = 1:length(stats)
bb = stats(object).BoundingBox;
bc = stats(object).Centroid;
plot(bc(1),bc(2), '-m+')
a=text(bc(1)+15,bc(2), strcat('X: ', num2str(round(bc(1))), ' Y: ', num2str(round(bc(2)))));
set(a, 'FontName', 'Arial', 'FontWeight', 'bold', 'FontSize', 14, 'Color', 'white');
end
ある条件下ではこのfor文が実行され、このfor文中の変数bcはリアルタイムに変化します。 この変化するbcの数値をすべて記録したいのですが、よい記述方法が思いつきません。 インクリメントのobjectは、必ずしも1ずつ増加するという動作を実行しておらず、 そのことが処理を難しくしています。
なんとかこのbcを記録する方法はないでしょうか。 回答をよろしくお願いします。
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!