Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a variable named x and use the linspace function to assign it 5 5 values ranging from - 5 to 5 . Next, create

Create a variable named x and use the linspace function to assign it 55 values ranging from -5 to 5. Next,
create a variable named y and assign it the values of x times 0.2. Now create a variable named y2 and
assign it the values of a sine by passing x to the sin function. Use the function plot to plot x vs
y. Use the function hold on so that you may plot x vs y2 on top of this. Use the function title to create a
graph title called Simple Line and Sine. Next use the xlabel and ylabel functions to label the x and y
axis as Time (s) and Data respectively. Use the function legend to label y as line and y2 as sine. Finally
call hold off so that nothing else is plotted on top of these graphs.
Create a sinc wave. Do so by specifying an x vector ranging from -pi to pi (pi is a reserved keyword in
MATLAB of value pi) with 70 values, and then pass this vector to the sinc function. Now, amplify this sinc
wave so that it has a max value of 50. Hint: this is done by mathematically manipulating the values
produced by the sinc function. Plot the result, give it some title and some x and y labels. Separately plot
the result again using the stem function. Note which plot represents the continuous-time function and
which represents the discrete-time function.
Finally, create a vector named vectorA. Use linspace to assign it 11 values ranging from 2 to 3. Now create
another vector named vectorB. Then, assign it values using the following code vectorB=2:.1:3. Inspect the
actual values of these vectors by opening them (click on their names in the workspace). Are they the
same? Conceptually, how did the construction of these two vectors differ (what is the difference in the
parameters used to construct them)?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

5. Have you any experience with agile software development?

Answered: 1 week ago