Answered step by step
Verified Expert Solution
Link Copied!

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 the input vector elements. Then create a driver m-file named ex11p1_LastName.m that calls fx2.m in order to perform the Newton quotient. Compute the error in the estimated derivative for h values: 10^(0), 10^(-1), 10^(-2) 10^(-16). Use the MATLAB function semilogx to plot the error versus h. NOTE: You should implement ex11p1_LastName.m without using a FOR loop (i.e., make use of MATLABs vectorization capability).image text in transcribed

11.1 The Newton quotient: may be used to estimate the first derivative f (x) of a function f(x), if h is "small." Write a program to compute the Newton quotient for the function: f(x) -x 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," i.e., less than about 10 12 11.1 The Newton quotient: may be used to estimate the first derivative f (x) of a function f(x), if h is "small." Write a program to compute the Newton quotient for the function: f(x) -x 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," i.e., less than about 10 12

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 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

=+15-4 Describe the biopsychosocial approach to development.

Answered: 1 week ago