# Y1 4 2t y2 43t y316 2t splice together the different

• No School
• AA 1
• 6

This preview shows page 2 - 5 out of 6 pages.

y1 = -4-2*t; y2=-4+3*t; y3=16-2*t; % splice together the different %functional variations in their % respective range of validity y= y1.*(-2<t&t<=0)+ y2.*(0<t&t<=4)+y3.*(4<t&t<=8); end syms t g3= piecewise(t<-2,0,-2<t<=0,-4- 2*t,0<t<=4,-4+3*t, ... 4<t<8,16-2*t,t>8,0); fplot(g3,[-5 20]) hold on grid on
Q3. Basic Operations on Signals ( Q3_Lab1.m ) Using MATALB plot the transformed functions, which are based on g(t) defined in Q#1: 3 g ( t + 1 ) , g ( 3 t )/ 2 , and 2 g (( t 1 )/ 2 ) % program to plot the transformed functions 3*g(t+1), % g(3*t)/2, -2*g((t-1)/2) and the original function for % comparision purpose tmin=-4; tmax = 20; dt = 0.01; t = tmin:dt:tmax; % program to graph some demonstrations of continuous- time % function combinations t= 0:1/100:5; % vector of time points for graphing x1 % Generate values of x1 for graphing x1= exp(-t).*sin(20*pi*t)+exp(-t/2).*sin(19*pi*t); subplot(2,1,1); plot(t,x1, 'r' , 'LineWidth' ,2); % Label the abscissa and ordinate xlabel( 'time(sec)' ); ylabel( 'x_1(t)' ); grid on t= -2:1/100:2; % Vector of time points for graphing x2 % Generate values of x2 for graphing x2= rectangularPulse(t).*cos(20*pi*t); subplot(2,1,2); plot(t,x2, 'b' , 'LineWidth' ,2); xlabel( 'time(sec)' );
g0 = g(t); % compute the original "g(t)" g1 = 3*g(t+1); g2 = g(3*t)/2; g3 = -2*g((t-1)/2); % Find the maximum and minimum g values in all the scaled or % shifted functions and use them to scale all graphs the % same gmax = max([max(g0),max(g1),max(g2),max(g3)]); gmin = min([min(g0),min(g1),min(g2),min(g3)]); % graph them all on equal scales using the axis command subplot(2,2,1); plot(t,g0, 'k' ,

#### You've reached the end of your free preview.

Want to read all 6 pages?

• Fall '19
• Continuous function, 2T

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes