?? frft_square.m
字號:
f=[zeros(1,23) ones(1,15) zeros(1,23)];
p1= 0.0318;
frft1=frft(f,p1);
frft1_r=real(frft1);
frft1_i=imag(frft1);
p2=0.2548;
frft2=frft(f,p2);
frft2_r=real(frft2);
frft2_i=imag(frft2);
p3=0.5;
frft3=frft(f,p3);
frft3_r=real(frft3);
frft3_i=imag(frft3);
p4=1;
frft4=frft(f,p4);
frft4_r=real(frft4);
frft4_i=imag(frft4);
figure;
subplot(2,2,1);
plot(frft1_r);
hold on;
plot(frft1_i,'r--');xlabel('采樣點數(shù)');
ylabel('變換后值的大小');
subplot(2,2,2);
plot(frft2_r);
hold on;
plot(frft2_i,'r--');xlabel('采樣點數(shù)');
ylabel('變換后值的大小');
subplot(2,2,3);
plot(frft3_r);
hold on;
plot(frft3_i,'r--');xlabel('采樣點數(shù)');
ylabel('變換后值的大小');
subplot(2,2,4);
plot(frft4_r);
hold on;
plot(frft4_i,'r--');xlabel('采樣點數(shù)');
ylabel('變換后值的大小');
figure(2);
subplot(2,2,1);
p1_inv=-0.0318;
frft1_inv=frft(frft1,p1_inv);
plot(real(frft1_inv));xlabel('采樣點數(shù)');
ylabel('反變換后值的大小');
subplot(2,2,2);
p2_inv=-0.2548;
frft2_inv=frft(frft2,p2_inv);
plot(real(frft2_inv));xlabel('采樣點數(shù)');
ylabel('反變換后值的大小');
subplot(2,2,3);
p3_inv=-0.5;
frft3_inv=frft(frft3,p3_inv);
plot(real(frft3_inv));xlabel('采樣點數(shù)');
ylabel('反變換后值的大小');
subplot(2,2,4);
p4_inv=-1;
frft4_inv=frft(frft4,p4_inv);
plot(real(frft4_inv));xlabel('采樣點數(shù)');
ylabel('反變換后值的大小');
figure(3);
plot(f);
axis([0 70 -0.5 1.5])
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -