Answered step by step
Verified Expert Solution
Question
1 Approved Answer
THE ERROR I am getting when I run the code is: >> mycosh(1.5) Undefined function or variable 'myfactn'. Error in mycosh (line 9) term =
THE ERROR I am getting when I run the code is:
>> mycosh(1.5) Undefined function or variable 'myfactn'.
Error in mycosh (line 9) term = sin * (y.^n ./myfactn(n));
MATLAB. What is wrong with my code? The question I am writing a code for is below as well as my code wrote but I keep getting an error when trying to run it The hyperbolic cosine function can be evaluated by the following infinite series as cosh y 1+ 2! 4! 6! Create a function M-file mycosh that takes y as the input and returns cosh(y) with an absolute iterative error less than 1.0e-14. This function must be able to plot a graph of truncation error versus the order of expansion. Assume that the Matlab built-in function cosh() returns the exact value. Note that the odd order expansion terms are zero in the above expansion. Test your function with y 1.5Step 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