label(S15,Tontsize, 20, MG 17 (generate a sinusoidal signal) Generate a sinusoid Write a script to generate a sinusoidal signal y and a vector containing the corresponding time values t using the...


label(S15,Tontsize, 20,<br>MG 17 (generate a sinusoidal signal)<br>Generate a sinusoid<br>Write a script to generate a sinusoidal signal y and a vector containing the corresponding time values t using the following variables:<br>. A. amplitude of the sine function<br>• w. frequency of the sine function<br>- phi phase of the sine function<br>• T interval between time samples<br>•n. number of time samples<br>These variables have already been defined for you in the solution template. Folow the steps below to complete the script<br>N Start by calculating the tinal time sample value and assign the result to the variable tf That is, what will the final time value be if you want a vector of n time samples<br>beginning at 0 and separated by a spacing of T?<br>2/ Use the colon operator (Gy to create row vector of n time samples trom e to tf spaced by T. and assign the result to the variable t.<br>3. Use t and the sin function to create the corresponding row vector of n sine function values evaluated at the time values in t, where the amplitude, frequency, and phase of<br>the sine wave are given by the variables above. Assign the result to the variable y<br>Code to plot the sinusoid has been provided at the end of the script Test your solution by using the Run Code button, if the results seem reasonable, submit your solution for<br>assessment<br>NOTE: The sin function tetums the sine of the argument in radians<br>Script e<br>H Save<br>C Reset<br>O MATLAB Documentation<br>1A- 2: X Aaplitude<br>2w-3; X Frequency<br>phi - 0.e1; X Phase<br>AT-0.02; Time step<br>sn-100: X Number of signal points<br>6 A-2;<br>7w-3;<br>s phi- 0.01:<br>9T-0.02;<br>10 n-100:<br>11<br>12 tf-2:<br>13 t-0:T:tf;<br>14y- A sin(2 ph1.t):<br>as<br>15<br>stem(t.y)<br>label(ssTontsize20, Interpreter,

Extracted text: label(S15,Tontsize, 20, MG 17 (generate a sinusoidal signal) Generate a sinusoid Write a script to generate a sinusoidal signal y and a vector containing the corresponding time values t using the following variables: . A. amplitude of the sine function • w. frequency of the sine function - phi phase of the sine function • T interval between time samples •n. number of time samples These variables have already been defined for you in the solution template. Folow the steps below to complete the script N Start by calculating the tinal time sample value and assign the result to the variable tf That is, what will the final time value be if you want a vector of n time samples beginning at 0 and separated by a spacing of T? 2/ Use the colon operator (Gy to create row vector of n time samples trom e to tf spaced by T. and assign the result to the variable t. 3. Use t and the sin function to create the corresponding row vector of n sine function values evaluated at the time values in t, where the amplitude, frequency, and phase of the sine wave are given by the variables above. Assign the result to the variable y Code to plot the sinusoid has been provided at the end of the script Test your solution by using the Run Code button, if the results seem reasonable, submit your solution for assessment NOTE: The sin function tetums the sine of the argument in radians Script e H Save C Reset O MATLAB Documentation 1A- 2: X Aaplitude 2w-3; X Frequency phi - 0.e1; X Phase AT-0.02; Time step sn-100: X Number of signal points 6 A-2; 7w-3; s phi- 0.01: 9T-0.02; 10 n-100: 11 12 tf-2: 13 t-0:T:tf; 14y- A sin(2 ph1.t): as 15 stem(t.y) label(ssTontsize20, Interpreter,"latex") ylabel('sys,Fontsire, 20, Lnterpreter latex") SUND- A-T rei enb
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here