Question: 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.5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
