东南大学 matlab实验三,东南大学Matlab作业3(22页)-原创力文档

百度文库-

百度文库-让每个人平等地提升自我

PAGE

PAGE #

Matlab Worksheet 3

Part A

Using function conv_m.m to make convolution between the following to functions (x and h): x=[3, 11,7, 0, -1, 7, -5, 0, 2];

h=[11,9, 0, -7, -3, 2, 0 -1];

n x=[-2:6];

n h=[0:7];

Plot the fun cti ons and convo luti on results.

An swer:

home_work_3_A_1.m

x=[3, 11,7, 0, -1,7, -5, 0, 2];

h=[11,9, 0, -7, -3, 2, 0 -1];

nx=[-2:6];

nh=[0:7];

[y, n y]=c on v_m(x, nx,h, nh);

subplot(3,1,1);

stem( nx,x);

ylabel('x[ n]');

axis([-6 10 -20 20]);

subplot(3,1,2);

stem( nh,h);

ylabel('h[ n]');

axis([-6 10 -20 20]);

subplot(3,1,3);

stem( ny,y);

xlabel( 'n');

ylabel('y[ n]');

axis([-6 10 -50 50]);

conv_m.m

fun cti on[y, ny]=con v_m(x ,n x,h ,nh)

%con voluti on fun cti on

%conv_m.m

nyb=nx(1)+nh(1);

nye=n x(le ngth(x))+nh(le ngth(h));

ny=[nyb:ny e];

y=c on v(x,h);

end

Plot the frequency response oveiOfor the following transfer function by letting

z ej , whereis the frequency (rad/sample)., with appropriate labels and title.

H(z)z

H(z)

z

z21.6z 0.9

An swer:home_work_3_A_2.mdelta=0.01;Omega=0:delta:pi;z=exp(j .* Omega);H= z ./ (z.

An swer:

home_work_3_A_2.m

delta=0.01;

Omega=0:delta:pi;

z=exp(j .* Omega);

H= z ./ (z.A2+1.6*z+0.9);

subplot(2,1,1);

plot(Omega, abs(H),'m' , 'LineWidth'

xlabel( '0

ylabel( '|H(\Omega)|');

axis([0 pi 0 max(abs(H))]);

subplot(2,1,2);

,2);

plot(Omega,ata n2(imag(H),real(H)),

xlabel( '0

ylabel( ' -\pi < \Phi_H

title(' freque ncy resp on se');

'k', 'LineWidth' ,2);

axis([0 pi -pi pi]);

<

H

<

Use fft to analyse following signal by plotting the original signal and its spectrum.

x[n] sin 2 32』 sin 2 137』 sin 2 467』

102410241024

An swer: home_work_3_A_3.m

%Exam ine sig nal comp onents

%sampli ng rate 1024Hz

N=1024;

dt=1/N;

t=0:dt:1-dt;

%****defj ne the sig nal**

x= sin(2*pi*32 .*t) +sin(2*pi*137 .*t )+ sin(2*pi* 467 .*t ) (%***********************

subplot(2,1,1); plot(t,x); axis([0 1-1 1]); xlabel('nT (sec on ds)');

ylabel('x[ n]');

X=fft(x);

d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值