16 lines
503 B
Matlab
16 lines
503 B
Matlab
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); |