/**************** example1.c by Michael J. Scott April 15, 1997 for ME171 demonstrates use of matrix.h and matrix.c (get from http://www.design.caltech.edu/Courses/ME171/) compile command is: gcc -g -Wall -o example1 matrix.c example1.c ***********/ #include #include #include "matrix.h" #define VECTORS 8 void main(){ FILE *fpin,*fpout; int i,j; double t1[N][N]={{1,0,0,0},{0,1,0,0},{0,0,1,0},{-6,-8,-7.5,1}}; double t2[N][N]={{1,0,0,0},{0,0,-1,0},{0,1,0,0},{0,0,0,1}}; double t[N][N]; double vec[VECTORS][N],tempvec[N]; /******* read in the data file ********/ fpin = fopen("in.dat","r"); for(i=0;i