The following is the built-in humps function that MATLAB uses to demonstrate some of its numerical capabilities:
The humps function exhibits both flat and steep regions over a relatively short x range. Here are some values that have been generated at intervals of 0.1 over the range from x = 0 to 1:
X | 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 |
f(x) | 5.176 | 15.471 | 45.887 | 96.500 | 47.448 | 19.000 |
X | 0.6 | 0.7 | 0.8 | 0.9 | 1 |
|
f(x) | 11.692 | 12.382 | 17.846 | 21.703 | 16.000 |
|
Fit this data with a (a) cubic spline with not-a-knot end conditions and (b) piecewise cubic Hermite interpolation. In both cases, create a plot comparing the fit with the exact
humpsfunction.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.