i need mause coordinate

1 回表示 (過去 30 日間)
Yunus
Yunus 2014 年 12 月 8 日
コメント済み: Yunus 2014 年 12 月 8 日
i use
axes(handles.axes1); hold on for a=1:n; for ii=1:4 [xi,yi] = ginput(1); plot(xi,yi,'ro') xx(ii)=xi; yy(ii)=yi; end plot(xx,yy,'k'); plot([xx(1) xx(end)],[yy(1) yy(end)],'k'); fill(xx,yy,'r') end
code but i obtain pixels dimention but i want to get which latitude and longitude in picture.
by the way i try tu use input m but there is error it says " Error using gcm (line 26) Not a map axes.
Error in inputm (line 45) gcm(hndl);
Error in goruntu_isleme_arayuz>pushbutton7_Callback (line 145) [c,v]=inputm(4)"
thans for helping

採用された回答

matt dash
matt dash 2014 年 12 月 8 日
inputm is only for use with a "map axes" which is created using axesm. It sounds like you are not creating an actual map, just a regular axes which you interpret as having latitude and longitude coordinates. In this case you have to do the conversion from data units to latitude/longitude yourself.
  1 件のコメント
Yunus
Yunus 2014 年 12 月 8 日
Mr. matt dash could you write simple code please because i tried select axes but i failed.by the way thank you.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by