Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is a matlab question. Please write in details. TASK 2 NOT ASSESSED Truncation error is the error introduced by the use of an approximate
this is a matlab question. Please write in details. TASK 2 NOT ASSESSED Truncation error is the error introduced by the use of an approximate expression in place of an exact mathematical expression or formula. For example, the function In(2+x) can be expressed as a Taylor series as i-1 Write an M-file to implement this formula for "n" terms so that it computes and displays the values as each term in the series is added to the expression. For example, if n=5, compute and display to the MATLAB command window the sequence of values: In(2+x)#1+x In(2+x)(+) ln(2-+x)-(l-x)--l+x) In(2+x1++)++ In addition to the function estimate, also print (on the same line) the percentage truncation error. Put this calculation inside a while loop that asks the user for the number of terms to be used. Nest that while loop inside another while loop that asks the user to input a value of x. ENG1060 Assignment Page 1 of2 As a test case, use your program to compute In(1.5) for 1, 2, 3,.and 8 terms. Plot the error in In(1.5) as a function of n on a log-log plot with blue circles. Note: Please try to draw a flow chart or an "algorithm" description before you start to code
this is a matlab question. Please write in details.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started