ENGS 105 -- Winter 2012
The file hw0.dat contains a matrix A whose size is
written in the second line of the file. This is an ascii file.
Warmup Exercise -- HW0
The following exercises are intended to get you going with fortran, matlab, and html in a unix environment.
- Establish a www page in your directory which will contain your homework.
Indicate thereon your preferred email address.
Do not link to or display anything not strictly professional.
Email your url to Matt McGarry at Matthew.d.McGarry@Dartmouth.edu and he will link it to your name (and link)
on the participant page accessed through the course website so we can review your assignments together. The link will also provide
an easy way to exchange data/results and ask questions about specific assignments, electronically.
- Write a program (to be named named first.f) which
reads the matrix A, finds its max, min, and mean squared entries; computes the product B=A'A
(A' means the transpose of A),
and writes the result B to an ascii file (to be named B.dat).
- In Fortran: Read the file B.dat and extract the diagonal of B. Write it to a file.
- Plot the diagonal of B versus row index, using Matlab.
Also plot the negative square root of the diagonal entries of B in the same manner.
- Compute symmetry check for each entry in B:
abs[(Bij-Bji). Report the Mean, RMS (root-mean-square) and Max values of
- Do the same for a normalized version of the symmetry measure:
- Print (ascii) and Plot (Matlab) the third row of B and the second subdiagonal.
- Repeat steps 2 - 7 for C=AA'.