# HP Forums

Full Version: HP50G : TRN vs TRAN
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What is the difference between TRN and TRAN transpose-commands on the HP50G?

Regards,
Gil
Both return the transpose of a matrix when dealing with real numbers.

When dealing with complex matrices, TRAN just return the transpose whereas TRN returns the conjugate transpose.

See pages 3-255 and 3-258 of the AUR.
(11-16-2019 12:59 PM)grsbanks Wrote: [ -> ]Both return the transpose of a matrix when dealing with real numbers.

When dealing with complex matrices, TRAN just return the transpose whereas TRN returns the conjugate transpose.

See pages 3-255 and 3-258 of the AUR.

Strange that they didn't label it CTRN or something.
(11-16-2019 01:07 PM)Dave Britten Wrote: [ -> ]Strange that they didn't label it CTRN or something.

HERM, then

Cheers, Werner
(11-16-2019 01:07 PM)Dave Britten Wrote: [ -> ]Strange that they didn't label it CTRN or something.

Perhaps it has to do with the fact that originally all matrix operations were directly taken from the ones already implemented in Saturn assembly language for the HP-71B Math ROM and there the conjugate transpose was named TRN.

Also, for complex matrices the conjugate transpose is by far the most useful operation as compared with just the transpose alone, which almost never appears in any algorithm or real-life application.

V.
Thanks.
I have got only the books for the HP48.
Lost the reference books relative to the HP50G?
Regards and thanks.
Gil
Strange that the instruction TRN, which includes the conjugate-operation, is from 5 to 10% faster than the "simpler" TRAN command.
Say X is the following Matrix:

[[ 1 6.35676254625 ]
[ 1 6.35675231425 ]
[ 1 6.3567482106 ]
[ 1 6.3567338557 ]],

without dots (.) after the ones.

Try a):
X TRAN X *

You get
[[ 4 25.4269969268 ]
[ 25.4269969268 161.633043179 ]]
(no dot after the 4).

Now try b):
X TRN X

You get apparently the same result:
[[ 4. 25.4269969268 ]
[ 25.4269969268 161.633043179 ]]
(but with a dot after the 4 => approximate mode).

Now try a2) :
X TRAN X * INV
YOU get
[[ 321639766412. -50598152402.8 ]
[ -50761421319.8 7985437126.68 ]]

Now try b2) :
X TRN X * INV
YOU get
[[ 322677625975. -50761421319.8 ]
[ -50761421319.8 7985437126.68 ]] }

The result are quite different.

Above all for the final result if I work for a regression, where
Beta = [(X'X)^(-1)X']Y,
where Y= [[ 20.0039363988 ]
[ 20.0039203398 ]
[ 20.0039138995 ]
[ 20.0039080362 ]].

I am somewhat puzzled in the choice
between TRN and TRAN when calculating
for the beta values.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :