Linewidth 2 xlabel tsec ylabel gt title original

  • No School
  • AA 1
  • 6

This preview shows page 4 - 6 out of 6 pages.

'LineWidth' ,2); xlabel( 't(sec)' );ylabel( 'g(t)' );title( ' Original function,g(t) ' ); axis([tmin,tmax,gmin,gmax]); grid; subplot(2,2,2); plot(t,g1, 'b' , 'LineWidth' ,2); xlabel( 't(sec)' ); ylabel( '3g(t+1)' ); title( 'First Change' ); axis([tmin,tmax,gmin,gmax]);grid; subplot(2,2,3); plot(t,g2, 'r' , 'LineWidth' ,2); xlabel( 't(sec)' );ylabel( 'g(3t)/2' ); title([ 'Second Change ' ]); axis([tmin tmax gmin gmax]); grid; subplot(2,2,4); plot(t,g3, 'g' , 'LineWidth' ,2); xlabel( 't(sec)' );ylabel( '-2g((t-1)/2)' ); title( 'Third Change' ); axis([tmin,tmax,gmin,gmax]);grid
Image of page 4
Q4: Periodic and Aperiodic signal determination using MATLAB Which of these functions are periodic and, if one is, what is its fundamental frequency? (a) g ( t ) = 10sin ( 12 πt ) + 4cos ( 18 πt ) (b) x ( t ) = 10sin ( 12 πt ) + 4 cos ( 18 t ) (c) y ( t ) = e j 60 πt Q5: Determining Even and odd parts of a function using MATALB Write a MATLAB code that compute even and odd part of the function given below and plot the results. (a) g ( t ) = 20cos ( 40 πt π 4 ) (b) y ( t ) = { 0, t < 0 t , 0 < t ≤ 1 t + 2,1 < t ≤ 2 0, t > 2 (c) % Program to computer and plot the even and odd part of Q#5 % Main function start here function GraphEvenAndOdd t =-5:0.1:5; ge= (g(t)+g(-t))/2; go = (g(t)-g(-t))/2; fmax = max([max(ge),max(go)]); fmin= min([min(ge), min(go)]); % part -B subplot(2,1,1); plot(t,ge, 'b' , 'LineWidth' ,2); xlabel( 't(sec)' );ylabel( 'g_e(t)' );grid; axis([-5 5 fmin fmax]); subplot(2,1,2); plot(t,go, 'r' , 'LineWidth' ,2); xlabel( 't(sec)' ); ylabel( 'g_o(t)' );grid;axis([-5 5 fmin fmax]); ( ii ) ( i )
Image of page 5
% Subfunction start here (only accessible within the main function) function y = g(t) y1= t; y2= -t+2; y= y1.*(0<t&t<=1)+y2.*(1<t&t<=2); end end Q6. Finding signal energy and power of signals using MATLAB Find the signal energy or power of the signals (a) x ( t ) = 4 e t 10 rec ( t 4 3 ) (b) A periodic signal of fundamental period 10 described over on period by x ( t ) =− 3 t , 5 < t < 5 % Program to compute the signal energy or power of Question # 6 %(a) dt = 0.1; t=-7:dt:13; x = 4*exp(-t/10).*rectangularPulse((t-4)/3); xsq = x.^2; Energy = trapz(t,xsq); disp([ '(a) Energy = ' , num2str(Energy)]); % (b) T0 = 10; % Fundamental Period of the periodic signal t= -5:dt:5; x = -3*t; xsq = x.^2; Power = trapz(t,xsq)/T0; disp([ '(b) Power = ' ,num2str(Power)]);
Image of page 6

You've reached the end of your free preview.

Want to read all 6 pages?

  • Fall '19
  • Continuous function, 2T

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

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