フィルターのクリア

How to plot latitude and longitude data vs time

20 ビュー (過去 30 日間)
GIRISH GOKUL CHENNUPALLI
GIRISH GOKUL CHENNUPALLI 2019 年 3 月 5 日
回答済み: Star Strider 2019 年 3 月 5 日
I've a matrix of data for longitude and latitude data along with a matrix of time. How do I make a plot with time on one axis and Latitude,longitdue on the other axis??

回答 (1 件)

Star Strider
Star Strider 2019 年 3 月 5 日
I would use a 3D plot:
time = 5 : 22; % Hours
Lat = randi([130, 140], size(time)); % Create Data
Lon = randi([120, 170], size(time)); % Create Data
figure
plot3(Lat, Lon, time)
grid on
xlabel('Latitude (°)')
ylabel('Longitude (°)')
zlabel('Time (hrs)')
If you must use a 2D plot, you would have to plot the latitude and longitude as separate lines:
figure
plot(time, Lat, time, Lon)
grid
legend('Latitude', 'Longitude', 'Location','best')

カテゴリ

Help Center および File ExchangeMapping Toolbox についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by