matrix invert routine (transpose)
Peter Renzland
peter at ontmoh.UUCP
Tue Nov 14 18:50:58 AEST 1989
awk '{for (i=1;i<=NF;i++) a[NR,i]=$i} # transpose a matrix: a[i,j] <--> a[j,i]
END {for (j=1;j<=NF;j++) {for (i=1;i<=NR;i++) printf("%s ",a[i,j]); print}}' $*
More information about the Comp.unix.questions
mailing list