home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
tsmatr12.zip
/
TSMATR.INF
< prev
next >
Wrap
Text File
|
1996-03-15
|
5KB
|
143 lines
- 1 -
Fri 15-March-1996
About TSMATR in General All rights reserved
=======================
This package may be used and distributed freely for NON-COMMERCIAL,
NON-INSTITUTIONAL, PRIVATE purposes, provided it is not changed in
any way. (Repacking with another method is ok, though.) For ANY
other usage, such as use in a business enterprise or a university,
contact the author for registration. Uploading to bulletin boards is
encouraged. Please do not distribute any part of this package
separately.
The programs are under development. If you have any comments or bug
reports, please do not hesitate to use electronic mail for
communication.
The author shall not be liable to the user for any direct, indirect
or consequential loss arising from the use of, or inability to use,
any program or file howsoever caused. No warranty is given that the
programs will work under all circumstances.
Timo Salmi (email: ts@uwasa.fi WWW: http://uwasa.fi/~ts/)
Professor of Accounting and Business Finance
Faculty of Accounting & Industrial Management
University of Vaasa
P.O. BOX 700, FIN-65101 Vaasa, Finland
SUMMARY:
TSMATR12 Matrix calculations by T.Salmi
Filename Comment
-------- --------------------------------
FILE_ID.DIZ Brief characterization of tsmatr
LINEQ.EXE Simultaneous linear equations
MATINV.EXE Inverse of a square matrix
MATMUL.EXE Multiplication of two matrixes
TSMATR.INF Document and a readme
TSMATR.NWS News concerning this package
TSPROG.INF List of programs from Timo Salmi
VAASA.INF Info: Finland, Vaasa, U of Vaasa
---- ------ ------ -----
0008
- 2 -
LINEQ (Ver 1.1) Simultaneous linear equations
===============
Solves simultaneous equations. The maximum capacity of the program
is 30 * 30. You give your problem directly as equations from file or
keyboard. The program will ask for your choices of the options
available.
An example of acceptable input to LINEQ:
!Exclamation marks can be used for comments
X + 2Y + Z = 13 !The first equation
Z = 5
-X + Y + Z = 8
END !To denote the end
The program has a built-in help system, which can be invoked by ? at
each interactive question. Use this help for more instructions.
The method for solving the simultaneous linear equations is Gaussian
elimination as presented in Turbo Pascal Version 4.0 Numerical
Toolbox. I measure the reliability of the solution x of the
simultaneous equations Ax = b is as follows. The elements of b-Ax
are calculated, and the sum of their absolute values is reported as
the 'inaccuracy of the solution'.
MATINV (Ver 1.1) Inverse of a square matrix
================
Usage: MATINV [optional input file name] [optional output file name]
or: MATINV ?
This program calculates the inverse and the determinant of a square
matrix.
The input can be taken from a file or the keyboard.
An example of the input:
!Exclamation marks can be used for optional comments
100 20 !First row
80 10 !Second row
A row can be continued by using an & or a * at the end. E.g.
100 &
20 !First row
The dimension of the matrix is defined by the number of elements on
the first row. When given from the keyboard, the input can be exited
by entering END.
The results are checked by multiplying the inverse with the original
matrix and comparing the result to an unity matrix. (Many, even
professional, programs lack this essential test.)
The algorithm used for inverting the matrix, and calculating the
determinant, are exactly the same as used in Turbo Pascal Version
4.0 Numerical Toolbox routines Inverse and Determinant. The former
applies Gauss-Jordan elimination. The present MATINV program and the
design of the user interface are, however, due to yours truly. As to
the algorithm for calculating the inverse matrix, it is not
satisfactory, which is somewhat surprising considering the source.
Inverting matrixes with elements of a very different scale, the
results are doubtful. Therefore, the deviation from unity measure,
which I have devised, is doubly important. The deviation measure is
calculated as follows. Let A denote the original square matrix, B
the inverse calculated by the program, I and identity matrix. First
I calculate the matrix A*B-I, and then the sum of the absolute
values of the elements of this matrix. This is what I call the
deviation from unity. An example of a problematic case is given by
100000000.00 2.00 3.00
1.00 2.01 3.00
0.01 0.02 0.03
MATMUL (Ver 1.1a) Multiplication of two matrixes
=================
Usage: MATMUL [optional input file name] [optional output file name]
or: MATMUL ?
This program multiplies two matrixes.
The input can be taken from a file or the keyboard.
An example of the input:
!Exclamation marks can be used for optional comments
100 20 !First row of the first matrix
80 10 !Second row of the first matrix
END
40 15 18 !First row of the second matrix
11 22 102 !Second row of the second matrix
END
A row can be continued by using an & or a * at the end. E.g.
100 &
20 !First row