g(t) = 3f(t) - 2f(t-1) +2f(t-2)
Kindly help me ...
I think you do this. Take laplace transform of the above
G(s)=3F(s)-2 Exp(-s) F(s) + 2 Exp(-2s) F(s)
Then the transfer function is G(s)/F(s) = 3-2 Exp(-s)+ 2 Exp(-2s)
The impulse response is when F(s)=1, then H(s)=3-2 Exp(-s)+ 2 Exp(-2s)
may be you can use matlab 'tf' to set it up.
also help laplace
Nasser
Thanks but how can find the impulse by using just For-loop...??
Use impz function
h = impz(1,[3 -2 2],100);
It gives the first 100 samples of the impulse response starting from
0.
Hope this helps!
bhupala.
I'm not a specialist, but why not simply
>> filter([3 -2 2], [1], [1 0 0 0 0 0 ]);
???
I hav already implement like this but i need to implement it by using for loop and then compare both results
No, you are right :-).
t = [-2:50]; % Time grid
d = zeros(size(t)); % Impulse function
d(t==0) = 1;
% g_t = 3f_t - 2f_{t-1} + 2f_{t-2}
h = zeros(size(t)); % Computation of impulse response
for k = 0:max(t),
h(t==k) = 3*d(t==k) - 2*d(t==k-1) + 2*d(t==k-2);
end
figure
stem(t,h) % Plot impulse response
title('a) Stable FIR system')
axis([-2 50 -3 3])
Andor <andor....@gmail.com> wrote in message <1abedda6-6560-43eb...@c1g2000yqg.googlegroups.com>...
Why???