home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-SSP.ARJ
/
MATRCE.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1984-06-14
|
314 b
|
19 lines
matrce(lra,n,a,trace)
/*this function computes the trace of a square matrix.*/
int lra,n;
float a[],*trace;
{
register int i,k;
*trace = 0.;
k = 0;
for(i = 0; i <= n - 1; i++)
{
*trace += a[k];
k += lra + 1;
}
}