Answered step by step
Verified Expert Solution
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 values ranging from to Next,
create a variable named y and assign it the values of x times Now create a variable named y 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 y 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 y 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 values, and then pass this vector to the sinc function. Now, amplify this sinc
wave so that it has a max value of 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 continuoustime function and
which represents the discretetime function.
Finally, create a vector named vectorA. Use linspace to assign it values ranging from to Now create
another vector named vectorB. Then, assign it values using the following code vectorB:: 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started