how do make an object move within the image that includes a graph?

1 回表示 (過去 30 日間)
latha
latha 2014 年 1 月 10 日
回答済み: Walter Roberson 2014 年 1 月 11 日
I have attached a image that is a graph,i want to move a dot kind of object with in the graph route in the image, how do i do it?

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 1 月 11 日
imread() the graphic. image() it up onto the figure. Use plot() to create a "line" consisting of a single point, with LineStyle 'none', MarkerFaceColor set to the color of the dot, MarkerEdgeColor probably set to the same color, MarkerSize set large, Marker set to 'o'.
Then to move the marker, set() the XData and YData properties of the "line" to the new position you want the dot to appear. Remember to drawnow() after each move to make the change visible.

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by