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
  • This problem will introduce you the MATLAB (if you have not used it before). In this...

    This problem will introduce you the MATLAB (if you have not used it before). In this course we will use MATLAB in a limited fashion to give you a glimpse on how it is used to solve engineering problems. In your junior year, you will spend an entire semester in AEM 3101 becoming very proficient in using MATLAB for engineering modeling and simulation purposes. In this problem you will use MATLAB to accomplish the following tasks: (a) Write a function...

  • 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

  • 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...

  • 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--');...

  • (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...

  • Need help converting the following code from Matlab into Python: N=2048; fs=4.9; t=0:1/fs:(N-1)/fs; fs1=200; t1=0:1/fs1:(N-1)/fs1; x2=0.5+0.6366.*cos(2.*pi.*t1)+0.1273.*cos(10.*pi.*t1)-0.0909.*cos(14.*pi.*t1);...

    Need help converting the following code from Matlab into Python: N=2048; fs=4.9; t=0:1/fs:(N-1)/fs; fs1=200; t1=0:1/fs1:(N-1)/fs1; x2=0.5+0.6366.*cos(2.*pi.*t1)+0.1273.*cos(10.*pi.*t1)-0.0909.*cos(14.*pi.*t1); x=0.5+0.6366.*cos(2.*pi.*t)+0.1273.*cos(10.*pi.*t)-0.0909.*cos(14.*pi.*t); X=fftshift(fft(x)); f=linspace(-fs/2,fs/2,N); plot(f,abs(X)./N); xlabel('f'); ylabel('|F(f)|'); title('magnitude spectrum of sampled signal'); x1=ifft(fftshift(X)); figure plot(t(1:100),x1(1:100)); xlabel('t'); ylabel('f(t)'); title('f(t) obtained by inverse transform'); figure plot(t1(1:1000),x2(1:1000)); xlabel('t'); ylabel('f(t)'); title('original f(t)');

  • 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...

  • 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...

  • 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...

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