Numerical Analysis: Theory and Experiments is a textbook on numerical analysis. Numerical methods are designed and implemented, and then they are analyzed through a combination of mathematical theory and numerical experimentation. Problem areas include interpolation, integration, linear systems, zero finding, and differential equations. Chebyshev methods are used early and often.
This package is a library of numerical routines that accompany the book.
The original package contains MATLAB codes. This is a port to Octave.
The library is installed as follows:
- Download the package nate-octave.tar.gz.
- Start Octave.
- Install the package:
The full pathname must be provided if
octave> pkg install nate-octave.tar.gz
nate-octave.tar.gz
is not located in the current working directory. - Load the package:
octave> pkg load nate-octave
- Verify that the library routines are available as follows:
octave> nate Numerical Analysis: Theory and Experiments
- Set the numeric format to
long
:octave> format long
Steps 4-6 must be repeated each time Octave is restarted.
The following code computes and plots the arctan function.
>> g = @(x) 1/(1+x^2); a = 0; b = 10;
>> fa = 0;
>> qs = samplecheb(g,[a b],60);
>> ps = antiderivcheb(fa,qs,[a b]);
>> p = interpcheb(ps,[a b]);
>> newfig;
>> plotfun(p,[a b],'displayname','p');
>> ylim([0 pi/2]);
>> legend('location','southeast');