[plt-scheme] matrix algebra
Dybvig's ANSI Scheme book contains a pretty complete solution to your
homework problem -- if my mail client displays things correctly. Your
formatting is bad and nearly impossible to read. A proper problem
statement would be better. We could then also point you to the proper
way of learning ...
-- Matthias
On Dec 15, 2007, at 1:05 PM, Justin d. wrote:
>
> 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<OpenOffice Writer
> File.pdf>_________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme