Unrecognized function or variable 'importfile'.
4 次查看(过去 30 天)
显示 更早的评论
I want to do the steps I have listed below, but I am encountering an importfile problem. No matter what I did, I could not import the file named .pos. Please help urgently..
clc; clear; close all;
load ref.mat
%%
wgs84= wgs84Ellipsoid('meter');
[lat, lon, h] = ecef2geodetic(wgs84, ref(1,1), ref(1,2),ref(1,3));
[x,y, utmzone, utmhemi] = wgs2utm(lat, lon);
ref=[x y h];
clear h lat lon utmhemi utmzone x y
%%
l = 2712;
a = importfile('MATLAB Drive/2_ISTA00TUR_R_20231040000_01D_30S_MO.pos', 1, 1);
[lat, lon, h] = ecef2geodetic(wgs84, a(:,4), a(:,5), a (:,6));
[x, y, utmzone, utmhemi] = wgs2utm (lat, lon);
ppp = [a(:,1) a(:,2) a(:,3) x y h];
clear a h lat lon utmhemi utmzone wgs94 x y
%%
a = ppp;
b = ref;
e = sqrt((a(:,4) - b(1,1)).^2 + (a(:,5)- b (1,2)).^2 + (a(:, 6) - b(1,3)).^2);
e = e * 100;
figure(1)
plot(e)
%%
%saga
y = 1;
m = max(abs(a(y:end, 4)- b (1, 1)))*100;
o = mean(a(y:end, 4)- b (1, 1)) * 100;
s = std(a(y:end, 4) - b (1, 1))* 100;
p = sum((a (y:end, 4)- b(1,1)).^2);
k = sqrt(p/(1-y))*100;
%%
%%saga
m1 = max(abs(a(y:end, 5)- b (1, 2)))*100;
o1 = mean(a(y:end, 5)- b (1, 2)) * 100;
s1 = std(a(y:end, 5) - b (1, 2))* 100;
p1 = sum((a (y:end, 5)- b(1,2)).^2);
k1 = sqrt(p1/(1-y))*100;
%
%h
m2 = max(abs(a(y:end, 6)- b (1, 3))) * 100;
o2 = mean(a(y:end, 6)- b (1, 3)) * 100;
s2 = std(a(y:end, 6) - b (1, 3)) * 100;
p2 = sum((a(y:end, 6)- b(1, 3)).^ 2);
k2 = sqrt(p2/(1-y))*100;
table = [m o s k m1 o1 s1 k1 m2 o2 s2 k2];
4 个评论
Dyuman Joshi
2024-1-7
Could you attach the file? I don't have much experience with .pos files, but I can surely try something and see what works.
Use the paperclip button to attach.
采纳的回答
Dyuman Joshi
2024-1-7
移动:Dyuman Joshi
2024-1-7
readtable works on the text file -
T = readtable('2_ISTA00TUR_R_...1D_30S_MO.txt', 'Delimiter', ' ', ...
'ConsecutiveDelimitersRule', 'join')
T = convertvars(T, 1, @(x) datetime(x, 'InputFormat', 'yyyy/MM/dd hh:mm:ss.SSS'))
Note that you will need to use the variable names or curly brackets to access the data inside.
See this documentation page for more info - Access Data in Tables
%Using variable name
T.Var1
%Using curly bracket and index
T{:, 1}
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Array Geometries and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!