Question: Question Function ( use matlab ) ( 1 ) . Create a function plotSinFunc to recognize the number of input arguments automatically. ( 2 )
Question Function use matlab
Create a function plotSinFunc to recognize the number of input arguments automatically.
If the number of input argument is we can call it like plotSinFuncf create a time series
xlinspace pi f and plot the sinx You should use squares as markers and a dashed
red line of thickness for the line. Set the marker face color to be black properties are
LineWidth, MarkerFaceColor
If there are inputs, ie function usage like plotSinFuncf f create two time series
xlinspace pi f and xlinspace pi f and, open a new figure with axes,
plot sinx on top and plot sinx on the bottom.
If the number of input arguments is other, display 'Only one or two inputs are allowed'.
Think about the possibility of a negative number as the input. How to recognize it in your
function, and try to write a robust function.
In a script m file to call the plotSinFunc with the input arguments:
a Only one arguments:
b Two arguments:
c Two arguments:
Hint: the number of input arguments are in the builtin variable nargin.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
