Comments concerning all codes.
These codes are the same as those that appear in the text with
possible minor improvements and corrections. The codes were
written and tested on a LINUX based machine, but should run
on other platforms with the possible necessity of adding a
file extension to the ASCII data files.
These codes use the built in functions and matrix algebra
supplied with the student version of MATLAB. Hence, they
are much more compact than the m_script codes and should
run faster. The stiffness matrices are stored in MATLAB
sparse matrix configuration and MATLAB's equation solver
is used in all codes. For that reason, the Gauss elimination
routines and the NEWNUM.m programs are not needed to
run these codes. For courses which do not place emphasis
on code development, these codes might be preferable to the
m_script codes. In order to distinguish the MATLAB
codes from the m_script codes (they both are *.m codes)
the MATLAB codes begin with upper case letters.
These codes follow the same structure as the
m_script codes presented in the text and
should be easily understood by FORTRAN
The major difference between these codes and the m_script
codes is the necessity of dimensioning all
arrays at the beginning of each program. To facilitate
this, PARAMETER statements have been used in most codes
for the purpose of dimensioning all arrays.
These PARAMETER statements are placed in the codes
through the use of INCLUDE statements.
Hence, it is only necessary to
change the parameter values in these files rather than
the dimensions in each code.
These parameter files,
must be in the working directory.
Some changes have been made for plotting results.
MATLAB graphics can still be used to plot the output from
the programs; however, if MATLAB is not available,
several codes have been provided which create postscript
files. The program topo.f is similar to topo.m, but
plots contours only.
However, the contours are
plotted in color to help interpret their values.
The mesh and newnum programs do not automatically make
plots, but plots similar to those available with the m_script
codes can be made using mshplt.f.
Other graphical help can be obtained by clicking on
There are no codes for plotting 1D results (graphs). Any
number of graphical packages can be used for this purpose,
e.g. GNUPLOT, and some command files have been provided
for those who wish to use GNUPLOT.
These codes also follow the same structure as the
m_script codes presented in the text.
Memory is allocated using malloc(); hence, there is
no need to dimension matrices as was done in the
FORTRAN codes. Because pointers are used,
these codes are not as easily compared with the
codes in the text. However, C-programmers should
be able to make the transition.
The plotting packages are the same as those
descirbed above in the FORTRAN section.
Of course, if the user has access to MATLAB, the m_script
codes can also be used to plot output from the
The author makes no claim to being an experienced
programmer in all of these languages; hence,
you may notice a lack of sophistication
in many of the codes - my apologies for that.
Other than the m_script codes, these codes have
not been class room tested and there could be
some errors lurking in them,
although I hope not.
However, if you do find any, I would greatly
appreciate you letting me now at:
Updates in all codes will be made periodically,
and will be posted on the text's web page
by Wiley. However, you can always obtain the
very latest update on my web page at:
Good luck, and do not hesitate to email me if
you have any questions.