Dotan Cohen wrote:
>> Try
>>
>> ? lu_factor;
>>
>>
>
> Naturally, I found lu_factor and get_lu_factor which were mentioned in
> the man pages. However, I cannot figure out exactly how to use them.
> lu_factor(M); did not work, and it is not clear to me from the man
> pages exactly what I need to do. It looks like I need to use lu_factor
> first and then enter that output into get_lu_factor, but I cannot
> figure out how to do that.
>
Oh. Here's what I did. The description of get_lu_factor seems clear to me.
(%o48) matrix([1,2],[3,4])
(%i49) lu_factor(%);
(%o49) [matrix([1,2],[3,-2]),[1,2],generalring]
(%i50) get_lu_factors(%);
(%o50) [matrix([1,0],[0,1]),matrix([1,0],[3,1]),matrix([1,2],[0,-2])]
And %o50[1] . %o50[2] . %o50[3] gives the original matrix.
Ray