home *** CD-ROM | disk | FTP | other *** search
- trsqmt(lra,n,a,b,tracea,traceb)
-
- /*purpose.. to determine the trace of an nxn matrix*/
- /*with complex elements.*/
-
- int lra,n;
- float a[],b[],*tracea,*traceb;
-
- {
- int i,k;
-
- *tracea = 0.;
- *traceb = 0.;
- k = 0;
-
- for(i = 0; i <= n-1; i++)
- {
- *tracea += a[k];
- *traceb += b[k];
- k += lra + 1;
- }
- }