Answered step by step
Verified Expert Solution
Question
1 Approved Answer
**In MATLAB** Create a script file for the sign function: Function y = sign_fun(x) Inputs: x = vector of any size Outputs: y = vector
**In MATLAB**
Create a script file for the sign function:
Function y = sign_fun(x)
Inputs: x = vector of any size
Outputs: y = vector with sgn(x) values
(a) Use your function to plot the sign function for 1001 values between -5 and 6.
(b) Compare the output y1 of your function with the output y2 built-in sign(x) by computing the maximum absolute error: max| y2 - y1|.
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