Question: 3. (15 pts) Prepare a C code to calculate the function 1 y(x) = In x2 - 25 for any legal value of x. If

3. (15 pts) Prepare a C code to calculate the function 1 y(x) = In x2 - 25 for any legal value of x. If the value of x is illegal, report that to the user by printing an error message. Note that in the above equation, In is the natural algorithm to the base e, the C function for this mathematical function is log. Also, note that In is not defined when -5 5x55. 4. (10 pts) Repeat problem 3 using Matlab. If the value of x is illegal, use the Matlab built-in function, error, to display an error message on the command window
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
