?? four_case_doppler_v2.m
字號:
clear all;
an=[1,0.3,-0.8,0.5,-0.4,0.2];
tn=[0,1,2,3,4,5;0,1,2,3,4,5;0,0.1,0.2,0.3,0.4,0.5;0,0.1,0.2,0.3,0.4,0.5];
wn=[0,2,10,6,8,4;0,20,100,60,80,40;0,2,10,6,8,4;0,20,100,60,80,40];
for k=1:4;
for i=1:6;
s1(i,:)=an(i)*exp(j*0*wn(k,i))*[zeros(1,(100*tn(k,i))),ones(1,501),zeros(1,(1000-100*tn(k,i)))];
s2(i,:)=an(i)*exp(j*0.02*wn(k,i))*[zeros(1,(100*tn(k,i))),ones(1,501),zeros(1,(1000-100*tn(k,i)))];
end
y1(k,:)=sum(s1(:,1:end));
y2(k,:)=sum(s2(:,1:end));
end
t=((1:1:length(y1(1,:)))-1)*10^(-2);
subplot(4,2,1);plot(t,real(y1(1,:)));ylabel('case 1');ylim([-2 2]);
hold on
plot(t,real(y2(1,:)),'r');title('real part')
hold off
subplot(4,2,2);plot(t,imag(y1(1,:)));ylim([-2 2]);
hold on
plot(t,imag(y2(1,:)),'r');title('imaginary part')
hold off
subplot(4,2,3);plot(t,real(y1(2,:)));ylabel('case 2');ylim([-2 2]);
hold on
plot(t,real(y2(2,:)),'r');
hold off
subplot(4,2,4);plot(t,imag(y1(2,:)));ylim([-2 2]);
hold on
plot(t,imag(y2(2,:)),'r');
hold off
subplot(4,2,5);plot(t,real(y1(3,:)));;ylabel('case 3');ylim([-2 2]);
hold on
plot(t,real(y2(3,:)),'r');
hold off
subplot(4,2,6);plot(t,imag(y1(3,:)));ylim([-2 2]);
hold on
plot(t,imag(y2(3,:)),'r');
hold off
subplot(4,2,7);plot(t,real(y1(4,:)));xlabel('Time(us)');ylabel('case 4');
hold on
plot(t,real(y2(4,:)),'r');ylim([-2 2]);
hold off
subplot(4,2,8);plot(t,imag(y1(4,:)));xlabel('Time(us)');ylim([-2 2]);
hold on
plot(t,imag(y2(4,:)),'r');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -