リアルタイムに変化する変数への代入値を記録する方法
Afficher commentaires plus anciens
こんにちは。
以下のコードについて質問があります。
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を記録する方法はないでしょうか。 回答をよろしくお願いします。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Programming dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!