为什么在matlab中使用xcorr求相关是错误的,急求大神!!! 15
>>dt=0.004;t1=[0:dt:100];A1=1.5;f1=35;t2=[0:dt:100];A2=0.8;f2=50;x=A1*sin(2*pi*f1*t1)...
>> dt=0.004;
t1=[0:dt:100];
A1=1.5;
f1=35;
t2=[0:dt:100];
A2=0.8;
f2=50;
x=A1*sin(2*pi*f1*t1);
B=100;
y=A2*exp(-B*t2.*t2).*sin(2*pi*f2*t2);
[a b]=xcorr(x,y,'unibased');
[a1 b1]=xcorr(x'unibased');
subplot(2,1,1);
plot(b*dt,a);
subplot(2,1,2);
plot(b1*dt,a);
??? Error using ==> xcorr
Input argument is not recognized. 展开
t1=[0:dt:100];
A1=1.5;
f1=35;
t2=[0:dt:100];
A2=0.8;
f2=50;
x=A1*sin(2*pi*f1*t1);
B=100;
y=A2*exp(-B*t2.*t2).*sin(2*pi*f2*t2);
[a b]=xcorr(x,y,'unibased');
[a1 b1]=xcorr(x'unibased');
subplot(2,1,1);
plot(b*dt,a);
subplot(2,1,2);
plot(b1*dt,a);
??? Error using ==> xcorr
Input argument is not recognized. 展开
1个回答
展开全部
dt=0.004;
t1=0:dt:100;
A1=1.5;
f1=35;
t2=0:dt:100;
A2=0.8;
f2=50;
x=A1*sin(2*pi*f1*t1);
B=100;
y=A2*exp(-B*t2.*t2).*sin(2*pi*f2*t2);
[a, b]=xcorr(x,y,'unbiased');
[a1, b1]=xcorr(x,'unbiased');
subplot(2,1,1);
plot(b*dt,a);
subplot(2,1,2);
plot(b1*dt,a);
t1=0:dt:100;
A1=1.5;
f1=35;
t2=0:dt:100;
A2=0.8;
f2=50;
x=A1*sin(2*pi*f1*t1);
B=100;
y=A2*exp(-B*t2.*t2).*sin(2*pi*f2*t2);
[a, b]=xcorr(x,y,'unbiased');
[a1, b1]=xcorr(x,'unbiased');
subplot(2,1,1);
plot(b*dt,a);
subplot(2,1,2);
plot(b1*dt,a);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询