[plt-scheme] matrix algebra
i m trying to write a function that implements matrix algebra . I saw it on the book exexcise but i think i need a help coz i m very new on scheme
Example
(1 - 1/3) +[ 2 -1/2] * [ -8 -1/2 3/25 ] +[2 3 -1] = [-85/9 -34/15 -408/575 ]
[ 7/3 5 ] [ 7/3 1/5 -9/23] [1/2 1/3 -1] = [-25/6 2/9 -3653/1725]
> (mateval ' (+ (* (- 1 ( 1 3))
( ( 2 ( -1 2)) ( (7 3) 5) )
( (-8 (-1 2) (3 25) ) ( (7 3) (1 5) (-9 23) ) ) )
( ( 2 3 -1) ( ( 1 2) (1 3) -1 ) ) ) )
the result
> ( ( (- 85 9) (34 15) (-408 575) ) ( ( -25 6) (2 9) (-3653 1725) ) )
the first expression , (1 - 1/3) , is not matrix but constant
and
( 1 3 ) is representing 1/3
(- 1 2) is representing -1/2 i mean this is the rational representing form
help me pls
_________________________________________________________________
Share life as it happens with the new Windows Live.
http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenOffice Writer File.pdf
Type: application/pdf
Size: 16039 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20071215/3d6de82a/attachment.pdf>