UP

Program to generate table 1.1 in the  textbook "Finite Difference Methods for Ordinary and Partial Differential Equations by Randall J. LeVeque"

 

by Nasser M. Abbasi, Sept 26,2010

 

This table below from the textbook shows the different errors generated by finding approximation to derivative of sin(x) using  the following 4 different schemes

 

 

This is an image of the table from the book: it says:

 

 

 

These below are few programs I wrote to generate the table above.

 

language

Source code

output

Fortran 95

ex1.f90.txt

Fortran makefile is makefile

fortran_output.txt

Ada (GNAT)

t1.adb.txt
gnat project file is t1.gpr

See t1.adb.txt

Mathematica 7

notebook

PDF

Matlab 2010a

matlab_script.m.txt

matlab_script_output.txt