Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a. Modify the m file as follows: - You will still prompt the user for a number and for the desired number of iterations -

image text in transcribedimage text in transcribed

a. Modify the m file as follows: - You will still prompt the user for a number and for the desired number of iterations - Check the inputs and select the correct Taylor series for the input given (you may have already done this for the previous homework section). - Modify your check for invalid inputs - now the only invalid inputs are x values that are less than or equal to 0. - Modify your fprintf statement to display the original number, x, entered by the user and the estimate of the ln(x) with 8 places behind the decimal point. b. Now run the script to complete the following table. %ln(x) for numbers 0 to 2 \% The script will prompt the user for the value % of x and the number of terms to use and display the resulting % approximation, the actual value of ln(x) (using log(x) ), and the error. % \% get values from user x = input("Please enter the value of x: "); N = input("Please enter the number of terms: "); % compute actual value of exponential actual=log(x) \% Taylor Series for when x>2 not in this script! % taylor_series_ x=log(1/x) \% compute Taylor series expansion taylor_series =0; tolerance =0.01; % while abs(taylor_series - actual)>tolerance for k=1:N1 \% Taylor series for the range 2 not in this script! % taylor_series_ x=log(1/x) \% compute Taylor series expansion taylor_series =0; tolerance =0.01; % while abs(taylor_series - actual)>tolerance for k=1:N1 \% Taylor series for the range

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago