knowledge_map/gpstotrack.m
2021-01-22 10:13:42 +08:00

16 lines
503 B
Matlab
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

clc;%清理命令行窗口
clear all;%清理工作区
%读取excel数据同目录下
tx=xlsread('C:\Users\yewuya\Desktop\航点gps\110606.xlsx');%此时.m文件和Excel文件都在工作路径即同一目录如果不是在Excel名称前加上路径
desire_alt = tx(:,1);
desire_lat = tx(:,2);
desire_lng = tx(:,3);
current_alt = tx(:,4);
current_lat = tx(:,5);
current_lng = tx(:,6);
plot3(current_lat,current_lng,current_alt,'k','linewidth',1,'markersize',10);
hold on
plot3(desire_lat,desire_lng,desire_alt,'r','linewidth',1,'markersize',10);