How to move an object on the map between 2 points?

조회 수: 3 (최근 30일)
hasan ugurlu
hasan ugurlu 2022년 6월 23일
댓글: Chandrika 2022년 7월 11일
I have a problem of tracking the movement of an object. How can i see the navigation of an object between 2 geographical position on a map? let's say between Lat1 34.811N, Long1 139.281E - Lat2 34.791N, Long2 139.258E. thanks in advance for the answers and kind help.

답변 (1개)

Chandrika
Chandrika 2022년 6월 26일
As per my understanding, you want to track trajectory between two positions on a geographical map. In MATLAB, we can do this using the 'geoplot' function. Here is the reference code:
lat1=34.811;
long1=139.281;
lat2=34.791;
long2=139.258;
geoplot([lat1 lat2],[long1 long2],'r-')
text(lat1,long1,'Position1');
text(lat2,long2,'Position2');
For better understanding, please follow the attached documentation on 'geoplot' https://in.mathworks.com/help/matlab/ref/geoplot.html
  댓글 수: 2
hasan ugurlu
hasan ugurlu 2022년 6월 27일
thanks for your answer, but my problem is not plotting, i wanna see movement between these positions. for example a dot or circle depart from position 1 and arrive to position 2 with the speed of 25km/h.
Chandrika
Chandrika 2022년 7월 11일
Could you please provide more description or sample demo into your requirement or attach the code if you are using any, so as to reproduce the issue?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by