Signals and Systems: List of MATLAB Problems: 1 Create a row vector x = (2; 3; 5; 7; 11; 13; 17; 19; 23; 29) in MATLAB. Now use the colon operator to display only the even entries of the vector, that is, the output should be the vector (3; 7; 13; 19; 29). Now do the same thing but display the output in reverse order, that is, the output should be (29; 19; 13; 7; 3) 2 Plot three functions (sin, cos, sin 2 ) with independent variables using three subplots. 3 Plot exponential decay function. Use commands title, grid, xlabel and ylabel. 4 Use Matlab’s linspace (a,b,n) command to generate n equally spaced numbers between a and b. for the given values of a, b, and n. Also zero out every odd indexed entry. Use Matlab’s stem command to plot the elements in the resulting vector versus their indices. 5 Plot following functions for t= -5 to 5 using inline command. (a) f(t)=e -t cos(2лt) (b) g(t)= e -3t 2sin(лt) 6 Plot unit step function u(t) with inline and axis modification. 7 Plot following pulse signals: (a) p(t) = u(t)-u(t-1) (b) q(t) = u(t-3)-u(t-5) 8 Plot following time shift and time scaled signals: g(t) = e -t cos(6t), g(t-1), g(t+1), g(2t+1) 9 Find the energy of following signals: (a) x(t) = e -t cos (2лt) u(t). (b) g(t) = e -t u(t)-u(t-1) 10 Write a MATLAB program to generate the following signals using sign(t) function. (a) Unit step signal u(t) (b) Unit Impulse signal impls(t) (a) a rectangular pulse of width of 2 (b) Unit ramp signal r(t) 11 Write a MATLAB program to generate the following signals using sign(t) function. (a) u(t-3) (b) u(2t+2) (c) impls(t-2.5) (d) r(t-3) 12 Write a MATLAB program to generate the following signals. (a) a 50 Hz sinusoidal signal sin(2pift) sampled at 600Hz. (b) A sinc function (c) A square wave 13 Find the roots of polynomial " ax 2 + bx + c” for given values of a,b,c. 14 Consider the LTI Sys specified by differential equation:
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Signals and Systems:
List of MATLAB Problems:
1 Create a row vector x = (2; 3; 5; 7; 11; 13; 17; 19; 23; 29) in MATLAB. Now use the
colon operator to display only the even entries of the vector, that is, the output should be the vector (3; 7; 13; 19; 29). Now do the same thing but display the output in reverse order, that is, the output should be (29; 19; 13; 7; 3)
2 Plot three functions (sin, cos, sin2) with independent variables using three subplots.
3 Plot exponential decay function. Use commands title, grid, xlabel and ylabel.
4 Use Matlab’s linspace (a,b,n) command to generate n equally spaced numbers between a and b. for the given values of a, b, and n. Also zero out every odd indexed entry. Use Matlab’s stem command to plot the elements in the resulting vector versus their indices.
5 Plot following functions for t= -5 to 5 using inline command. (a) f(t)=e-t cos(2лt) (b) g(t)= e-3t 2sin(лt)
6 Plot unit step function u(t) with inline and axis modification.
8 Plot following time shift and time scaled signals: g(t) = e-t cos(6t), g(t-1), g(t+1), g(2t+1)
9 Find the energy of following signals: (a) x(t) = e-t cos (2лt) u(t). (b) g(t) = e-t u(t)-u(t-1)
10 Write a MATLAB program to generate the following signals using sign(t) function. (a) Unit step signal u(t) (b) Unit Impulse signal impls(t) (a) a rectangular pulse of width of 2 (b) Unit ramp signal r(t)
11 Write a MATLAB program to generate the following signals using sign(t) function. (a) u(t-3) (b) u(2t+2) (c) impls(t-2.5) (d) r(t-3)
12 Write a MATLAB program to generate the following signals. (a) a 50 Hz sinusoidal signal sin(2pift) sampled at 600Hz. (b) A sinc function (c) A square wave
13 Find the roots of polynomial " ax2 + bx + c” for given values of a,b,c.
14 Consider the LTI Sys specified by differential equation:
RATHOR
Highlight
(D2 + 4D + 3)y(t)= (3D + 5) x(t). Using initial conditions y(0)=3, Dy(0)=-7, determine zero input component of the response.
15 Determine the impulse response h(t) for for an LTI sys specified by differential equation:
(A) (D2+3D+2) y(t) = D x(t) (B) (D2+2D+1) y(t) = D x(t) (C) D (D+2) y(t) = (D+4) x(t)
16 Solve the differential equation: (A) (D2+3D+2) y(t) = x(t)
using input x(t) = 5t + 3 and initial conditions y(0)=2 & Dy(0)=3. (B) (D2+5D+6) y(t) = (D+1) x(t)
using input x(t) = 6t2 and initial conditions y(0)=25/18 & Dy(0)=-2/3 17 Sketch the following discrete time signals: