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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!