home *** CD-ROM | disk | FTP | other *** search
- maswch(lra,lrb,nrow,ncol,a,b)
-
- /*this function interchanges two matrices or vectors.*/
-
- int lra,lrb,nrow,ncol;
- float a[],b[];
-
- {
- int i,j,ija,ijb;
- float c;
-
- for(i = 0; i <= nrow-1; i++)
- {
- ija = i * ncol;
- ijb = ija;
- for(j = 0; j <= ncol-1; j++)
- {
- c = a[ija];
- a[ija] = b[ijb];
- b[ijb] = c;
- ija++;
- ijb++;
- }
- }
- }
-