(%i8) m : genmatrix(lambda([i,j], 1.0/(i + j - 1)), 5,5)$
(%i9) b : genmatrix(lambda([i,j], 1.0),5,1)$
(%i10) linsolve_by_lu(m,b, 'floatfield);
(%o10) [matrix
([5.000000000079979],[-120.0000000015632],[630.0000000069121],[-1120.000000010609],
[630.0000000052486]),1.0690256198668838*10^+7]
The last entry of the list in %o10 is an upper bound for the matrix
condition number. A better
value for the condition number is
(%i14) mat_cond(m,1), ratprint : false;
(%o14) 943655.9999980911
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>Is?it?possible?to?force?Maxima?to?behave?more?like?Matlab?with?regard?to
>internal?arithmetic?precision.?I?am?trying?to?solve?a?system?of?linear
>equations?with?linsolve.?Maxima?converts?the?numbers?to?rational?numbers
>and?does?the?gaussian?elimination?with?this?rational?numbers?and?gives
>me?the?exact?results.?Can?I?force?Maxima?to?do?the?internal?arithmetic
>with?limited?floating?point?precision??I?want?to?get?results?similar?to
>Matlab.?What?I?am?saying?is:?Maxima?gives?too?perfect?solution?:)