Xref: utzoo alt.sources.wanted:20 comp.sources.wanted:9404 comp.unix.questions:17652 Path: utzoo!utgpu!attcan!ontmoh!peter From: peter@ontmoh.UUCP (Peter Renzland) Newsgroups: alt.sources.wanted,comp.sources.wanted,comp.unix.questions Subject: Re: matrix invert routine (transpose) Message-ID: <627033058.28748@ontmoh.UUCP> Date: 14 Nov 89 07:50:58 GMT References: <1612@xn.LL.MIT.EDU> Organization: Ontario Ministry of Health -- Decision Support, Toronto, Canada Lines: 2 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}}' $*