I am making goal position on matlab by the help of cursor. Like every time when code runs the position of target is different. Now my question is how can I get the location of that goal so that I can use it for calculating distance. The code
조회 수: 2 (최근 30일)
이전 댓글 표시
h=msgbox('Please Select the Target using the Left Mouse button'); uiwait(h,5); if ishandle(h) == 1 delete(h); end xlabel('Please Select the Target using the Left Mouse button','Color','black'); but=0; while (but ~= 1) %Repeat until the Left button is not clicked [xval,yval,but]=ginput(1); end xval=floor(xval); yval=floor(yval); xTarget=xval; %X Coordinate of the goal yTarget=yval; %Y Coordinate of the goal
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Solar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!