Math 56: Resources
- SPRING 2013
Numerical Analysis
Experimental Mathematics
Mathematics
Tools
Coding tips
- Always write on paper what you want to achieve, and then write out a pseduocode, before you start typing.
- Try to put all user-adjustable parameters once at the top of your
program (script). Make everything work from these parameters.
- Write brief comments to explain what non-obvious lines do.
- Break down tasks which are repeated into subroutines (in MATLAB
these are called functions). Write out the interface (inputs and
outputs) to your function on pencil and paper before you start to code it up.
Document your function as you go.
- For every function, write a test routine that goes along with it and
verifies it does what it is supposed to do, on at least one known
test case.
- Here is an example documented function, which catches bad inputs,
and has a test driver:
zeta.m
and
testzeta.m
LaTeX and graphics production
This is the typesetting package essentially all mathematicians use.
You will use it for projects, and, I hope, homeworks.
- Here is our department's LaTeX resources.
- If you have a UNIX account (you probably do as a grad student; ask
your sysadmin) or linux OS
then you can use a standard text editor and the latex command.
If you have Mac OSX or Windows you need to install a LaTeX
distribution, as described here.
- Please let me know if you are stuck with installing LaTeX.
Sarunas Burdulis (our sysadmin, behing the math office) may also be able to help better than I.
- Here are sample files from X-hr of 3/27/13:
test.tex, squiggle.eps,
and the resulting PDF output test.pdf.
- Once you have it installed,
here are some
simple sample files that you can edit for your homework.
They produce PS which you can convert to a PDF file.
- Here is a quick guide to all the math symbols and brackets, etc. You will need to
\usepackage{amssymb,amsmath}
to get some of these symbols.
- Beamer is a great latex package in which to make slides for your talks.
(Although I still use Prosper).
Here's my toy files: a.tex
which uses EPS figure
fig.eps
. It produces this PDF.
- For drawing professional-looking figures I use xfig which you can find for linux via the usual package managers.
For Mac OSX install see here and the closest on windows (unless you
want to do cygwin and linux version of xfig) is
winfig.
Web authoring
- Get yourself a website account
hosted at Dartmouth if you don't already have one
(you probably do if you're a grad student; ask your department sysadmin).
- Dave Raggett's simple
HTML guide is all you could ever need.
- Don't forget to Reload the page in your browser to check that the
updates you have made worked.
- Here
is the simplest webpage I ever made (`View Page Source' on your
browser).
It contains text and one link; you could modify it and replace
the address in the
link by href="figure1.ps" if
figure1.ps
is a file in the
same directory, for instance a figure file printed to file from Matlab.
SOFTWARE ENVIRONMENTS & PROGRAMMING