Newsgroups: alt.sources.wanted
Path: utzoo!utgpu!radio.astro!me!sun
From: sun@me.utoronto.ca (Andy Sun Anu-guest)
Subject: Re: matrix invert routine
Message-ID: <89Nov10.162408est.20065@me.utoronto.ca>
Organization: University of Toronto Mechanical Engineering
References: <1612@xn.LL.MIT.EDU> <2560@ucsfcca.ucsf.edu> <4573@emory.mathcs.emory.edu>
Distribution: na
Date: Fri, 10 Nov 89 16:23:55 EST

In article <4573@emory.mathcs.emory.edu> arnold@emory.UUCP (Arnold D. Robbins {EUCC}) writes:
>>In article <1612@xn.LL.MIT.EDU>, rkc@XN.LL.MIT.EDU (rkc) writes:
>>> I have "spreadsheet-like" data that looks like this:
>>> 	a1 b1 c1
>>> 	a2 b2 c2
>>> 	a3 b3 c3
>>> and I want to get it in a form like:
>>> 	a1 a2 a3
>>> 	b1 b2 b3
>>> 	c1 c2 c3
>
>In article <2560@ucsfcca.ucsf.edu> root@cca.ucsf.edu (Systems Staff) writes:
>>the transpose with standard Unix tools (I would look at awk first) ....
>
>Aha! No sooner said than done.  From the 2.11 gawk.texinfo manual:
>
>-- Begin Quote --
>The following example treats its input as a two-dimensional array of
>fields; it rotates this array 90 degrees clockwise and prints the
>result.  It assumes that all lines have the same number of
>elements.
> [program deleted]
>
>When given the input:
>
>	1 2 3 4 5 6
>	2 3 4 5 6 1
>	3 4 5 6 1 2
>	4 5 6 1 2 3
>
>it produces:
>
>	4 3 2 1
>	5 4 3 2
>	6 5 4 3
>	1 6 5 4
>	2 1 6 5
>	3 2 1 6
>
>-- End Quote --

Someone have brought it up already but I might as well clarify this again
(since it seems to wander further and further from the original thing). 
What the original poster wanted is called TRANSPOSE, or in other words, 
row-to-column, column-to-row operations. It's like reflecting the matrix about 
its diagonal. Matrix inversion is a totally different thing.

Now, the above "quote" was doing yet another thing, neither inverse or
transpose. It simply rotates the matrix clockwise 90 degrees (as it said
up there). Do we have an agreement on what "invert" or "transpose" are
or the definitions vary from place to place?

Andy
-- 

_______________________________________________________________________________
Andy Sun                        | Internet: sun@me.utoronto.ca
University of Toronto, Canada   | UUCP    : csri.toronto.edu!me.utoronto.ca!sun
Dept. of Mechanical Engineering | BITNET  : sun@me.utoronto.BITNET

