Question: This is the problem i'm given to solve. I tried the function as a normal series but i am not sure what i am doing
This is the problem i'm given to solve. I tried the function as a normal series but i am not sure what i am doing wrong, i just keep getting n=0.

Create a UDFunction to duplicate the behavior of the MATLAB function cos0. Use the Taylor Series expansions below in order to compute the value of cos (x). Name your function MyCos.m Use a while-loop which terminates when the number of terms, N reaches 1000 or when the absolute value of the next term (|av+1l) is less than eps. Your function must allow matrix inputs/outputs as well as scalar inputs/outputs This lab is very similar to HW7P4, wherein you were asked to do the same for the Mysinh () function for computing sinh (x). You may use the built-in function factorial() to compute the factorial of integers. r2n a246 2 24 720 0 (2n)! n- Create a variable Arad - [0, pi/6, pi/3, pi/2] and check your function by typing in the command window MyCos (Arad) -cos (Arad)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
