Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedThis 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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Place a value on the outcomes.

Answered: 1 week ago