home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
c
/
cla20.zip
/
HELP.DOC
< prev
next >
Wrap
Text File
|
1991-02-08
|
11KB
|
247 lines
============================================================
CLA - COMPUTATIONAL LINEAR ALGEBRA PROJECT - VERSION 2.0
============================================================
HOW TO SELECT A MENU ITEM
Just press a numeric key (0-9) or a function key (F1-F10).
ENTERING A MATRIX
There are three ways to enter a matrix: by keyboard, loading
it from disk or generating it ramdomly.
Using the keyboard, the matrix must be entered in the usual
format, row by row. Firstly will be asked the size of matrix. After
this, you have to write the matrix's elements one by one, pressing
[ENTER] at the end of the row. If [ENTER] is pressed before the end
of the row, then the row will be filled with zeros. For example, to
introduce the 4 x 4 identity matrix, just type the following:
1 [ENTER]
0 1 [ENTER]
0 0 1 [ENTER]
0 0 0 1 [ENTER]
You can enter numers in the p/q form like 1/2, -5/3 or 4.7/37.68
or in x^y form (x rised to y) like 2^15, -1.23^4, etc. The real ½
can be entered as 0.5, 1/2, 2^-1, -0.3/-0.6, etc. Parenthesis are not
allowed.
A matrix saved previously in disk can be loaded, if you furnish
exactly the path and name to it. If you add a ? or * to matrix's name
and if exists a file named MAT, then will be showed the names of
matrices available in disk. The file MAT can be created or updated
when ALC_ is written at DOS prompt.
PRESENTATION OF RESULTS
The results are presented in different ways, depending on matrix
size be greater, or less or equal to 5.
If you press the [F4] key then will be used the rational format
p/q if p = 1 or q <= MaxQ, where MaxQ is a constant with 200 as its
standard value. This and others standard values can be changed using
the utility CONFIG.EXE.
The rational presentation is not fast in general. The [F4] key
must be pressed before or after the results are presented.
When this version was made, no color video was available to me.
All the colors was defined using only its efect in a green-and-black
CGA video.
The standard quantity of fractionary decimal digits used to
present the results is 4.
If you press the [F8] after the presentation of a result, then
the result-matrix will be switched by the proposed-matrix (the
"proposed-matrix" is that entered by the user).
At the main menu (that's show the greater quantity of options),
if you press [Alt][T], the proposed matrix M will be substituted by
its transpose.
The characterisc polynomial can be factored, if you press the
[F10] key after its presentation on screen.
If you press [F10] after the presentation of Jordan form and all
the eigenvalues are real, will be calculated the basis associated
to the Jordan canonical form of the matrix.
SAVING THE RESULTS IN A DISK
Inside CLA the most of calculus are made with 20 decimal accu-
racy. On screen are showed a smaller quantity of decimals. Saving the
results in disk, you can observe the result with all digits and can
avoid waste paper too. To see a matrix previously saved, use the
SM.EXE utility.
All the matrices are saved in files with .MAT extensions. Each
matrix is 4202 bytes size. You can save matrices from everywhere in
CLA, even if the F2 option don't appear on screen.
The characteristic polynomial coefficients are saved in a file
named POLYNOM.CHR and can be observed at the end of CLA execution
(enter C:\> TYPE POLYNOM.CAR or C:\> ST POLYNOM.CAR).
The eigenvalues are saved in the EIGENVAL.UES file.
EIGENVALUES, EIGENVECTORS AND JORDAN CANONICAL FORM
The eigenvectors associated to complex eigenvalues are not cal-
culated in this present version. In this case, the Jordan form will
be presented in the real format. To each couple of complex eigenva-
lues a + bi, a - bi is written a 2 x 2 block of the form
┌ ┐
│ a -b │
│ b a │
└ ┘
The eigenvectors are shown one by one with their respecti-
ves eigenvalues and eigenspaces dimensions. To each real eigenvalue
is furnished a basis to the associated eigenspace. Remember that
the eigenspace spanned by (-1, 1, -1) is the same as that spanned by
(1, -1, 1) and the basis that gives Jordan form isn't unique.
The basis of Jordan form J of a matrix M can be saved as a
-1
matrix (say B). Thus, if P is the transpose of B, then J = P MP.
APROXIMATION ERRORS
Are used 14 different errors in CLA. You can know or modify them
using the CONFIG.EXE utility. It is not convenient to set too small
values (10 rised to -19 or smaller) to those errors because the CLA
could not to do some aproximations.
Forward we have the example of a 5 x 5 matrix such that, if the
ERROR5 of BASFPTC.TPU unit be adjusted in 10 rised to -18, so it
will be impossible the calculation of the characteristic polynomial.
If the pre-defined value of ERRO5 ( = 1E-08 = 0.00000001) is used,
then the calculation will be made without problems.
┌ ┐
│ 32/13 -3/13 0 0 -1/13 │
│ │
│ -12/13 32/13 0 0 2/13 │
│ │
│ -7/39 -1/13 3 0 -1/39 │
│ │
│ -43/13 -24/13 0 3 5/13 │
│ │
│ -6/13 3/13 0 0 27/13 │
└ ┘
2 3
The characterist polynomial of this matrix is p(x) = (x - 2) (x - 3) .
SENDING RESULTS TO A PRINTER
Press [Alt][P] or [Alt][I] to print any result. Press [Alt][L]
to print a blank line.
SIMILAR MATRICES
-1
The P MP option from main menu allows the calculation of
similar matrices, just give an inversible matrix P. This option is
very useful to construct problems or exercises with results known
previously.
The ONE.EXE utility builds matrices with determinants equal to 1
that are useful to be used as the P matrix above.
COMPOSING MAIN MENU ITENS
Given a matrix M, we can easyly obtain the minimal polynomial of
M rised to 5th power, the determinant of a matrix similar to M, etc.
To do this, just use the F8 option from main menu in each partial
result. For example, to calculate the Jordan form of the inverse
matrix of M, just press [1] [F8] [9].
PARAMETERS
The CLA accept 2 parameters: the way to enter the matrix and
the size or name of the matrix. The initial screens will be
omited in these cases:
CLA 1 matrix's_size
or
CLA 2 matrix's_name
or
CLA 3 matrix's_size
HOW TO FINISH THE EXECUTION
At any place press the F5 key, even if this option is not showed
on screen. The program will wait for a confirmation in this case.
ERROR MESSAGES
The CLA emits several error messages. Some of them are:
- READING ERROR: Means that there are phisycal problems in disk,
the drive is empty or the file was not found.
- WRITING ERROR: There are problems in disk, the disk is full or
the drive is empty.
In spite of almost all algorithms work well theoretically to any
order n, to that higher ones (n ≥ 10) can happen that some numeric
value increase too fast, and can occur an overflow error. In these
cases, will be emited an Turbo Pascal error messages (nr. 200 to 207)
that are one of the following: "Division by zero", "Range check
error", "Stack overflow error", "Heap overflow error", "Invalid
pointer operation", "Floating point overflow", "Floating point
underflow" or "Invalid floating point operation".
UTILITY PROGRAMS
The 5 programs described below work independently to the CLA
(that is, can be executed at DOS prompt) but all your results are
directionated exclusively to the CLA.
- SM.EXE: show on screen matrices saved in disk with a specifyed
quantity of decimal digits.
- CONFIG.EXE: configures several constants (errors, etc.) used
for the CLA units.
- BM.EXE: Given two square matrices A, B, the BM saves in disk a
block matrix whose main diagonal elements are A and B.
- ONE.EXE: saves in disk a matrix with a specifyed size and
whose determinant is 1 with integer elements (and, therefore, its
inverse has integer elements too).
- ST.EXE: show a text file (like the *.DOC or the POLYNOM.CAR,
EIGENVAL.UES) on screen.
PROGRAM'S MODULARIZATION
The CLA is a modularizated program. Your procedures and funtions
are distributed in 4 units with calculus (MATRICES, EQUATION, JORDAN
and LINALG) and 2 units (WINDOWS and BASFPTC) to manipulate screens,
menus, etc. The isolated use of these units is allowed and is shown
in some sample programs.
You can incorporated any procedure or function of these units to
your own Turbo Pascal programs. See the name and syntax of a procedu-
re or function in the CLA20.DOC file.
MORE INFORMATIONS
Several informations and some interesting examples can be found
in the CLA20.DOC files.
The CLA was completely developed at UFPB, the Federal University
of Paraíba (Brazil), during isolated time portions from may/1988 to
february/1991. It was born in the form of several small programs in
GWBASIC. I am planning the third version already. It will be used
the C language and many improvements will be made. My apologies for
the fails in translation to English. Any doubt, comment or hint are
welcome and will be apreciated if you send them to
Lenimar Nunes de Andrade
UFPB - CCEN - Dep. de Matemática
58.059 - Joao Pessoa, PB - BRAZIL
CCENDM03@BRUFPB.BITNET