Question: In hw 0 1 q 2 . m create a row of values for h parameter 1 0 , 1 , 0 . 1 ,

In hw01q2.m create a row of values for h parameter
10,1,0.1,0.01,...,106
and a correspondent to it row of errors e
12.649,4,1.2649,0.4,0.12649,0.04,0.012649,0.004
Evaluate the rate of convergence of the error e with respect to the parameter h and
report the final answer via %.
Cube each element of the error e using an inline function thirdpower = @(x) x.^3 to
create another row of new errors E. Hint: notice the helpful dot after x. Evaluate and
report to hw01q2.m the convergence rate of the error E with respect to the parameter
h.
Plot both sequences of errors e and E as functions of h at the end of hw01q2.m. Include
a legend with initial and cubed, a title Wow, and the axis labels, parameter and
error.

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!