📄 azimath.m
字号:
function azimath
global data;
%use UrEDAS method to compute the azimath and delta
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%[name path] = uigetfile('*.*','please choose a file','please open a file');
%file = strcat(path,name);
%data = load(file);
H = get(gcf,'UserData');
up_down = data(:,1);
ea_west = data(:,2);
no_south = data(:,3);
%alfa = 0.05;
alfa = str2num(get(H(4),'String'));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
R_UE = crosscorr(up_down,ea_west,floor(length(up_down)/2-1));
R_UN = crosscorr(up_down,ea_west,length(up_down)-1);
%figure
%subplot(211),plot(R_UE),title('crosscorr of up_down and ea_west');
%subplot(212),plot(R_UN),title('crosscorr of up_down and no_south');
ml = length(R_UE);
for i = 2:1:ml
R_UE(i) = R_UE(i-1)*alfa+up_down(i)*ea_west(i);
R_UN(i) = R_UN(i-1)*alfa+up_down(i)*no_south(i);
end
%figure
%subplot(211),plot(R_UE),title('crosscorr of up_down and ea_west');
%subplot(212),plot(R_UN),title('crosscorr of up_down and no_south');
for k = 1:1:length(R_UE)
sita(k) = atan(R_UE(k)./R_UN(k))*180;
end
%sita = atan(R_UE./R_UN)*180;
plot(sita)
set(H(7),'String',sita(ml));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -