Question

The purpose of this problem is to become familiar with the use of MATLAB. Consider the continuous-time function x(t) 2e0.5sin
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters.

clc;
clear all; % clear all variables
close all;

% define the time vector with 10 equally spaced samples
t = linspace(-5,5,10);

% define the unit step function
unit_step = (t>=0); % when time is > = 0 the logical values one is set.

% define the signal itelf
x = 2 * exp(-0.5*t) .* sin(8*pi*t) .* unit_step; % .* is used for point wise vector multiplication

% now plot the signal with 10 equally spaced points
figure;
plot(t,x);grid on;
xlabel('time(s)');ylabel('Amplitude');
title('x(t) with 10 equally spaced points');


clear all; % clear all variables

% define the time vector with 100 equally spaced samples
t = linspace(-5,5,100);

% define the unit step function
unit_step = (t>=0); % when time is > = 0 the logical values one is set.

% define the signal itelf
x = 2 * exp(-0.5*t) .* sin(8*pi*t) .* unit_step; % .* is used for point wise vector multiplication

% now plot the signal with 10 equally spaced points
figure;
plot(t,x);grid on;
xlabel('time(s)');ylabel('Amplitude');
title('x(t) with 100 equally spaced points');


clear all; % clear all variables

% define the time vector with 1000 equally spaced samples
t = linspace(-5,5,1000);

% define the unit step function
unit_step = (t>=0); % when time is > = 0 the logical values one is set.

% define the signal itelf
x = 2 * exp(-0.5*t) .* sin(8*pi*t) .* unit_step; % .* is used for point wise vector multiplication

% now plot the signal with 10 equally spaced points
figure;
plot(t,x);grid on;
xlabel('time(s)');ylabel('Amplitude');
title('x(t) with 100 equally spaced points');

x(t) with 10 equally spaced points 1.5 1 0.5 0 -0.5 -1 -5 5 4 2 -2 -4 time(s) N LO LC LO Amplitudex(t) with 100 equally spaced points 2 1.5 0.5 0 -0.5 -1 -1.5 -5 -4 -2 2 4 5 time(s) Amplitude LCx(t) with 1000 equally spaced points 2 1.5 1 0.5 0 -0.5 -1.5 5 4 2 -2 -5 -4 time(s) Amplitude N

From the above plots, it is observed that the first figure is not a good reproduction of the signal. This is because of the fact that the sampling frequeny is not sufficiently enough for reproducing all the frequency components of the signal. In the secondd figure, the signal severely distorted because of the less sampling freuency. The third plot is a best reproduction of the orignal signal. this is because the sampling frequency is much higher than the maximum frequency component of the signal.

Add a comment
Know the answer?
Add Answer to:
The purpose of this problem is to become familiar with the use of MATLAB. Consider the...
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
  • MATLAB 25. Do the following operations. - Write the MATLAB function and save it. function dxdt=difdenk(t,x)...

    MATLAB 25. Do the following operations. - Write the MATLAB function and save it. function dxdt=difdenk(t,x) dxdtax+5, Then solve this function with the following command on Command Window. [tx]=ode23('difdenk”,[02],0) plot(tx) xlabel(t) ylabel(y) Solve the following ordinary differential equation using MATLAB's Ordinary Differential Equation (ODE) solver with the initial condition of x(0) = 0 for a time span between 0 and 2. = x +t

  • modify this code is ready % Use ODE45 to solve Example 4.4.3, page 205, Palm 3rd...

    modify this code is ready % Use ODE45 to solve Example 4.4.3, page 205, Palm 3rd edition % Spring Mass Damper system with initial displacement function SolveODEs() clf %clear any existing plots % Time range Initial Conditions [t,y] = ode45( @deriv, [0,2], [1,0] ); % tvals yvals color and style plot( t, y(:,1), 'blue'); title('Spring Mass Damper with initial displacement'); xlabel('Time - s'); ylabel('Position - ft'); pause % hit enter to go to the next plot plot( t, y(:,2), 'blue--');...

  • Problem 1. (20) The purpose of this exercise is for you to get familiar with MATLAB...

    Problem 1. (20) The purpose of this exercise is for you to get familiar with MATLAB and some of its capabilities. We have seen in class that, for a positive integer n and data {(rj, yj)|j= 0,...n}, the matrix system produces the coefficients of the polynomial Pn(x) coc1x++ cn&" that interpolates the data, where [Vn]ij = x;_{ for 1 < i,j <n+1. Let r j/n, giving a uniformly spaced set of n 1 points in [0, 1]. Write a MATLAB...

  • (15 points) This problem is related to Problem 3.7 in the text. consider reviewing Section 3.2.1.1....

    (15 points) This problem is related to Problem 3.7 in the text. consider reviewing Section 3.2.1.1. The following MATLAB program plots the function v(t) = 5 cos(300 - 24t) + 2 sin (600 - 2x + ) t = 0: step :Tmax; V = 5* cos(2pi"300"t) + 2 sin(2"pi*600*t + pi/2); plot(t,v) xlabel('time (seconds)') ylabel('signal v(t)) axis([xmin,xmax,ymin,ymax]) What is the period of the signal v(t)? Suppose that we want to produce a plot that covers exactly 4 periods and has...

  • Then we can use the cylinder function to revolve those profiles around the z-axis and plot them. ...

    Please help me with this MATLAB programming problem! Im using MATLAB 2018 if that helps. We were unable to transcribe this imageThen we can use the cylinder function to revolve those profiles around the z-axis and plot them. t Now revolve it around the z-axis figure (4) x1,yl,z1 cylinder (profilel) clf: surf (xl, yl, z1) axis vis3d; shading faceted; colormap (jet) xlabel ) ylabel (Cy) zlabel (z 02 [x2.y2.z21cylinder (profflez): hold on: surf (x2, y2, z2) 10 -10 10 Note...

  • I'm trying to solve this differential equations by using matlab. But I don't know the reason why I can't ge...

    I'm trying to solve this differential equations by using matlab. But I don't know the reason why I can't get the solutions. I've attached matlab code and few differential equation. Please find a the way to solve this problem. second oder ode2.m x+ function, second-oder-ode2 t-0:0.001:30 initial-x = 0; initial-dxdt = 0: lt.影=ode45( @rhs, t, [initial.x initial.dxdt ] ); plot(t.(:,1l): xlabel( t); ylabel(x): 申 function dxdt=rhs( t, x) dxdt-1 =x(2); dxdt-2 (-50 x(2)+61.25+((1-cos(4 pi 10 t))/2) (47380 x(1)-3-7428 x(1) 2...

  • Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes co...

    Matlab help 1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...

  • are integers and 91 and 92 are 5. Consider the system diagram show in Fig. 2...

    are integers and 91 and 92 are 5. Consider the system diagram show in Fig. 2 for a digital filter. Assume N and M real-valued. (a) Use the diagram to write the difference equation that relates the input to the output. And use the difference equation to write the transfer function for the filter. No Matlab needed. (b) Assume N = 3, M = 5, 91 = 0.5 and 92 = 0.9. Write a Matlab function (call it "ece125filter”) that...

  • Part 1: Exponential Fourier series The following MATLAB code calculates the exponential Fourier series coefficient for...

    Part 1: Exponential Fourier series The following MATLAB code calculates the exponential Fourier series coefficient for the signal x(t) shown in the figure below, plots it's double sided amplitude spectrum IDn l, double sided phase spectrem LDn, and the resulting signal xn(t). 4r 4a Periodic signal x(t) 1.1 Show that the complex Fourier Series Coefficients written as: D 1.2 Use the following Matlab to general the two sided spectral line. 1.3 Execute the Matlab code with To = 2π and...

  • please sketch the polar plot of the frequency response.. (briefly please work in matlab) Problem-1 (100...

    please sketch the polar plot of the frequency response.. (briefly please work in matlab) Problem-1 (100 pts) Sketch the polar plot of the frequency response for the following loop transfer functions and analyze the stability of these systems based on the polar plots. (Hint: You can write a Matlab code to plot the response of these systems in polar coordinates and include your code in your report. Plots obtained by using the "nyquist0" function of Matlab will get a zero...

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