PS2Solns

PS2Solns - Figure 2 , Plot of resulting convolution y wrt...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Problem 6: Matlab Code: dt=0.1; %time step t1=0:dt:2; t2=0:dt:4; x1=ones(1,length(t1)); x2=ones(1,length(t2)); y=conv(x1,x2); %Note that convolution length: t is the sum of the lengths of t1 and t2 t=0:dt:6; %scale y with time step dt y=y*dt; %Note:you don’t need to use these functions, I just wanted to introduce you %to some new plot properties subplot(1,2,1),plot(t1,x1);title('x1 vs time'),xlabel('t'),ylabel('x1') subplot(1,2,2),plot(t2,x2);title('x2 vs time'),xlabel('t'),ylabel('x2') figure,plot(t,y); Figure 1, Plot and x1 and x2 wrt time
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Figure 2 , Plot of resulting convolution y wrt time NOTE: This part is not included to homework; I just put these for you so that you can see how the created arrays look like in Matlab. When you convolve x1 and x2(by taking the integral of x1 and x2) what you do is multiplying corresponding x1 and x2 values and the time interval, and then summing up these values. Since Matlab do not multiply the values with the time interval while convolving functions, you need to scale the result by multiplying dt after the convolution....
View Full Document

Page1 / 7

PS2Solns - Figure 2 , Plot of resulting convolution y wrt...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online