Question

Please use MATLAB code to answer these questions 2-1 Generate a pulse function with a pulse...

Please use MATLAB code to answer these questions

2-1 Generate a pulse function with a pulse width 1 second as an input function, x(t), and use the

same exponential decay function as impulse response function, h(t). Using MATLAB to

calculate the output of the system y(t).

2-2 Reduce the pulse width (such as 0.1 second) and repeat the question 2. Analyze the

difference.

2-3 Change the decay constant of h(t) (such as 1 and 3) and repeat the question 2. Analyze the

difference.

The input should be your own pick.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

%matlab

Ts=0.001;
t=0:Ts:5;
Ton=1;
x=1.*(t<=Ton);
T=1;
h=exp(-t./T);
y=conv(x,h)./(2*length(t)-1);
plot(t,y(1:length(t)));
xlabel('t');
ylabel('y(t)');
title(['convolution with pulse width T_{ON} = ' num2str(Ton) ' decay constant \tau = ' num2str(T)]);

------------------

%matlab

Ts=0.001;
t=0:Ts:5;
Ton=0.1;
x=1.*(t<=Ton);
T=3;
h=exp(-t./T);
y=conv(x,h)./(2*length(t)-1);
plot(t,y(1:length(t)));
xlabel('t');
ylabel('y(t)');
title(['convolution with pulse width T_{ON} = ' num2str(Ton) ' decay constant \tau = ' num2str(T)]);

---------------------

Add a comment
Know the answer?
Add Answer to:
Please use MATLAB code to answer these questions 2-1 Generate a pulse function with a pulse...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT