Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

wnloads/HW5 pdf Create a MATLAB code to calculate function f (z) = ei8r at any given point using Taylor series. Write a script file called

image text in transcribed

wnloads/HW5 pdf Create a MATLAB code to calculate function f (z) = ei8r at any given point using Taylor series. Write a script file called myTaylor.m and a function file called myFact.m to do the following: (a) The function myFact.m should return the factorial of a number when sent the number. In the script file: i. Set the starting point as r0-1 and fo = f(d)-6.049647 ii. Ask the user to enter his/her desired point and store it in x1 iii. Calculate the true solution for f(r1) and store it in TrueF1 iv. Calculate the first term of Taylor series at x1 and store it in TaylorF1 v. Calculate the true relative error of TaylorF1 and store it in TrueError vi. Use while loop and calculate next terms of Taylor formulation until the true relative error is less than 2%. (b) Once the next term is calculated, it should be added to the current value of TaylorF1 and the TrueError should be updated. i. Print the values of TaylorF1 and TrueError after each calculation ii. Count the number of Taylor formulation terms and print them (c) Run your program twice i. For x1 1.13 (you tan compare the results of this case with Question 2 ii. For one other x1 value of your choice. -IMG 6938JPG AIMG 6937 PG 4 5 6 8

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

Explain budgetary Control

Answered: 1 week ago

Question

=+what kinds of policies and practices should be developed?

Answered: 1 week ago

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago