?? xiangguan_qxy.m
字號(hào):
% 信號(hào)來(lái)源文件:rough烏魯木齊首站出站a;rough鄯善站進(jìn)站a
clear
close all
%x1:烏魯木齊首站出站; y1:鄯善站進(jìn)站
load xinpu_lanzhou_11172005
x1=x1-mean(x1);
y1=y1-mean(y1);
N=length(x1);
n=0:N-1;
Fs=50;
t=n/Fs;
Lag=100;
%x1=[x]';
%[c,lags]=xcorr(x1,x1,Lag,'unbiased');
[c,lags]=xcorr(x1,y1,'unbiased');
%c=xcorr(x1,y1);
subplot(121)
plot(t,x1,'r',t,y1,'b');title('信號(hào)序列起始時(shí)間:xinpu_lanzhou_11172005');% 注意: 文件中數(shù)據(jù)起始時(shí)間:6年11月8日31時(shí)36分41秒
xlabel('相對(duì)時(shí)間/秒');
%legend('x1:西靖出站','y1:新堡進(jìn)站');
axis tight;grid on
subplot(122);
plot(lags/Fs,c,'r');axis tight,title('x1與y1的互相關(guān)函數(shù)'),xlabel('相對(duì)時(shí)間/秒');
grid
[maxc,lo]=max(c);
lo=(lo-N)/50
ds=lo*1628
vs=148.8*1000/lo
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -