[PLUG] perl question, Math::Matrix stuff
Russell Senior
seniorr at aracnet.com
Fri May 5 19:53:58 UTC 2006
>>>>> "Dave" == Dave <dave at dhdo.org> writes:
Dave> foreach my $col ( 0..2 ) { foreach my $row ( 0..2 ) { print
Dave> ${$a->[$col]}[$row]; } }
> $a = new Math::Matrix ([ 1, 0, 0 ]
> [ 0, 1, 0 ]
> [ 0, 0, 1 ]);
> $x = new Math::Matrix ([ 1, 2, 3 ]);
> $E = $a->concat($x->transpose);
> $s = $E->solve;
>
> @output = ($subject,$s->transpose);
> print OUTPUT join(",", at output);
Changing the @output assignment line to:
@output = ($subject,@{$s->transpose->[0]);
does what I want. While perhaps not a 2000 lb block, the provided
clue was altogether sufficient. Thanks!
--
Russell Senior ``I have nine fingers; you have ten.''
seniorr at aracnet.com
More information about the PLUG
mailing list