Question: what should I change in my matlab code myapproximatederivative(f,a,t) which takes three inputs: f: A function handle. a: A real number Note: You may assume

what should I change in my matlab code myapproximatederivative(f,a,t) which takes threewhat should I change in my matlab codeinputs: f: A function handle. a: A real number Note: You may

myapproximatederivative(f,a,t) which takes three inputs: f: A function handle. a: A real number Note: You may assume that f'(a) exists. Does: Uses a while loop to calculate 1/2 1/3 1/4 until successive values differ by less than t. Returns: The final calculated value. function r - myapproximatederivative(f,a,t) h 1i oldapprox- (f (ath)-f (a))/h; h = h/2; approx = (f(ath )-f(a))/h; while (abs (approx-oldapprox)>=t) oldapprox = approx ; h=h/2; approx = (f(a+h )-f(a))/h; end r = approx; end

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!