Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Do a modification of exercise 11.1 on page 260 of chapter 11. Create a simple function m-file, named fx2.m that accepts a vector input and
Do a modification of exercise 11.1 on page 260 of chapter 11. Create a simple function m-file, named "fx2.m" that accepts a vector input and outputs a vector whose elements are the element-wise squares of order to perform the Newton quotient. Compute the error in the estimated derivative for h values: 10A(O), 10-1), 10N-2) 10-16). Use the MATLAB function 'semilogx' to plot the error versus h. NOTE: You should implement exi1p1_LastName.m without using a FOR loop (i.e., make use of MATLAB's 11.1 The Newton quotient f(x + h)--f(x) may be used to estimate the first derivative f(x) of a function f(), if h is "small. Write a program to compute the Newton quotient for the function: f(x) = x2 at the point x= 2 (the exact answer is 4 ) for values of h starting at 1 , and decreasing by a factor of 10 each time (use a for loop). The effect of rounding error becomes apparent when h gets "too small,".e., less than vectorization capability). about 10-12
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