# MATMAN The Matrix Manipulator

MATMAN is a FORTRAN77 program which allows an interactive user to define a matrix and carry out the individual steps of certain algorithms.

The program is intended to do the arithmetic correctly, while forcing a student to specify the correct sequence of operations to transform an arbitrary matrix into row echelon form.

MATMAN was developed by Professor Charles Cullen of the University of Pittsburgh, and John Burkardt, itinerant programmer.

MATMAN features include:

• Interactivity: students prescribe each row operation;
• Accuracy: MATMAN does the arithmetic operations;
• Flexibility: rational, real or decimal arithmetic may be used;
• Affordability: the price is right (it's freeware);
• Portability: complete FORTRAN source code available, executes on IBM (DOS or Windows), Mac (68K or PPC), UNIX, VMS.
• Repeatability: A transcript file records all work;
• Improvability: The developers are responsive to user requests.

MATMAN allows the user to:

• Request a sample problem, or type in a new one;
• Choose decimal, integer, rational or real arithmetic;
• Specify row or column operations in a natural form: "R1 <= 3 R1 + R2";
• Determine if the matrix is in row echelon form;

### Languages:

MATMAN is available in a FORTRAN77 version and a FORTRAN90 version.

### List of Routines:

• MATMAN is a program for interactive linear algebra demonstrations.
• ADDLIN is called whenever a new line is printed.
• AUTERO automatically row reduces the current matrix.
• BASIC assigns a row of the tableau to one of the basic variables.
• CAPCHR replaces any lowercase letters by uppercase ones.
• CHANGE allows the user to change an entry in the array.
• CHKADD checks the command to add a multiple of one row to another.
• CHKDET checks that a request for a determinant can be carried out.
• CHKERO checks for commands given in the form of ERO's.
• CHKMUL checks a command to multiply a row by a scalar.
• CHKTRN checks that a request to transpose a matrix can be carried out.
• CHLDEC returns a left-justified representation of IVAL * 10**JVAL.
• CHLINT returns a 6-character representation of an integer.
• CHLRAT returns a left-justified representation of IVAL/JVAL.
• CHRCHP "chops out" a portion of a string, and closes up the hole.
• CHRCTF reads an integer or rational fraction from a string.
• CHRCTG reads an integer, decimal fraction or a ratio from a string.
• CHRCTI reads an integer from a string.
• CHRCTR reads a real number from a string.
• CHRDB1 removes blanks from a string, left justifying the remainder.
• CHRDB2 replaces consecutive blanks by one.
• CHRINP requests new input if the LINE buffer is empty.
• CHRINT returns a 6-character representation of an integer.
• CHRITC0 stores an integer into a string, with left zero padding.
• CHRREA extracts a character string from the input buffer.
• CHRREL represents a real using 14 right justified characters.
• CHRUP3 divides a string into three parts, given the middle.
• CHRWRT writes a character STRING to one or more output units.
• COPMAT makes a copy of the current problem information.
• DBLDEC converts a double precision quantity to a decimal representation.
• DECCUT rounds a decimal fraction to a given number of digits.
• DECDET finds the determinant of an N by N matrix of decimal entries.
• DECDIV divides two NDIG digit decimals.
• DECMUL multiplies two decimals.
• DECPRN prints out decimal vectors and matrices.
• DECRAT converts a decimal to a rational representation.
• DECREA reads a decimal, rational or integer, and returns a decimal fraction.
• DECREL converts a decimal ITOP * 10**IBOT to a real value.
• DECWRN prints out a warning about using decimal arithmetic.
• DELADD deletes or adds a row or column to the matrix.
• DELCOL deletes a column by shifting other columns to the left.
• DELROW deletes a row by shifting other rows up.
• DIGTEN returns the integer value of a base 10 digit.
• DIVIDE divides one row of the matrix by a nonzero value.
• EVJACO carries out a Jacobi rotation on a square matrix.
• FILADD allows us to append information to a pre-existing file.
• FILRED reads an example from a file.
• FILWRT writes an example to a file.
• FLUSHL flushes a string left.
• FLUSHR flushes a string right.
• FORM converts from one arithmetic form to another.
• HELLO greets the user on startup.
• HELP prints out a brief list of the available commands.
• HLPVMS provides extensive help from the MATMAN help file.
• IGCF finds the greatest common factor of I and J.
• INDATA stores and retrieves common data items.
• INDEXI is a case-insensitive INDEX function.
• INFILE handles a new input file.
• INIMAT initializes the matrix by zeroing it out.
• INIT initializes the data.
• INTRAN returns a random integer in a given range.
• INTREA reads an integer from the input buffer.
• LAHLP1 prints out a brief list of useful linear algebra commands.
• LAINP0 begins the process of receiving a matrix from the user.
• LAINP1 accepts the values of the entries of a matrix from the user.
• LAOPT checks for row echelon or reduced row echelon form.
• LDIGIT returns .TRUE. if STRING contains only digits or blanks.
• LENCHR returns the length of STRING up to the last nonblank.
• LEQI is a case insensitive comparison of two strings for equality.
• LPHLP1 prints out a brief list of useful linear programming commands.
• LPINP allows the user to enter a linear programming problem.
• LPOPT checks the current linear programming tableau for optimality.
• LPPIV carries out pivoting for a linear programming problem.
• LPPIV1 zeroes out objective row entries for basic variables.
• LPPIV2 chooses the entering variable for pivoting.
• LPPIV3 chooses the departing variable for pivoting.
• LPREM removes the artificial variables.
• LPSAMA sets up an advanced linear programming problem.
• LPSAMS sets up a simple linear programming problem.
• LPSET switches the linear programming mode.
• LPSOL determines the current linear programming solution.
• MULPLY multiplies a row of the A matrix by a scale factor.
• NPAGE determines whether it's time to pause before more printing.
• PASS authenticates the password used for the automatic option.
• PERNEX computes all of the permutations of N objects, one at a time.
• RANDOM is a portable random number generator.
• RATDEC converts a rational value to a decimal value.
• RATDET finds the determinant of an N by N matrix of rational entries.
• RATDIV divides one rational value by another.
• RATMUL multiplies two fractions.
• RATPRN prints out rational vectors or matrices.
• RATREA reads a rational value, expressed as integer, decimal or fraction.
• RATREL converts rational values to real values.
• RATTRN transposes a rational matrix.
• RATWRN prints out a warning about using rational arithmetic.
• RELDEC converts a real value to a decimal fraction form.
• RELDET finds the determinant of a real N by N matrix.
• RELPRN prints out real vectors and matrices.
• RELRAT converts a real value to a rational value.
• RELREA "reads" a real value from a line of text.
• RELTRN transposes the real matrix A.
• RELWRN prints out, just once, a warning about using real arithmetic.
• RESTOR restores a matrix that was saved earlier.
• SAMPLE allows the user to choose a particular sample problem.
• SCADIV divides row IROW of the A matrix by a scale factor.
• SETDIG allows the user to specify the maximum digits in a decimal.
• SETLIN sets the current output page line number.
• SETPAG sets the number of lines per output page.
• SHFCOL allows a new column to be inserted by shifting others right.
• SHFROW allows a new row to be inserted by shifting other rows down.
• SWPROW swaps two rows of a matrix.
• TRANSC opens or closes a transcript file.
• TYPE prints out the matrix or tableau.
• TYPES prints out the linear programming solution.

You can go up one level to the FORTRAN77 source codes.

Last revised on 21 January 2009.