Question

9. MATLAB Problem: Use Matlab to find the convolution y(t) of f(t)2tu(t) and h(t) ut1u(t-1). You should submit a printout of

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

t1--1: .01 :-.01; t2-0:.01:4; tl-tl % from-1 % t2 from 0 to 4 t1 to -0.01 t= [t1;t2]; % merge t1 and t2 ut-[zeros (size (t1))0.02 0.018 0.016 0.014 0.012 0.01 0.008 0.006 0.004 0.002 1 -0.5 0 0.5.5 2 2.53 3.5 4

matlab code:

t1=-1:.01:-.01; % t1 from -1 to -0.01
t2=0:.01:4; % t2 from 0 to 4
t1=t1';
t2=t2';
t=[t1;t2]; % merge t1 and t2

ut=[zeros(size(t1));ones(size(t2))]; %unit step function
%(ut=1 for t>=0 and ut=0 for t<0
ft=2*t'*ut; %ft value
ht=[];

%calculation of ht using ut and t values
i=2;
while i<length(t)
ht(i)=ut(i+1)-ut(i-1)
i=i+1;
end

yt=.01*conv(ut,ht); %convolution
plot(t,yt(1:length(t))); %plot

Add a comment
Know the answer?
Add Answer to:
9. MATLAB Problem: Use Matlab to find the convolution y(t) of f(t)2tu(t) and h(t) ut1u(t-1). You ...
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
ADVERTISEMENT