help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: solving equation system


From: Przemek Klosowski
Subject: Re: solving equation system
Date: Tue, 19 Apr 2005 14:46:48 -0400 (EDT)

   I hope that someone can point out a shorter way to define the coefficient 
   matrix since all its rows are of the form [1,x,x^2,x^3,x^4].

You are right---there's a shorter way. That's a form of VanDerMonde matrix:

c =

  124.500
  111.000
   88.900
   75.500
   63.000

octave:67> vander (c)
ans =

   2.4026e+08   1.9298e+06   1.5500e+04   1.2450e+02   1.0000e+00
   1.5181e+08   1.3676e+06   1.2321e+04   1.1100e+02   1.0000e+00
   6.2461e+07   7.0260e+05   7.9032e+03   8.8900e+01   1.0000e+00
   3.2493e+07   4.3037e+05   5.7002e+03   7.5500e+01   1.0000e+00
   1.5753e+07   2.5005e+05   3.9690e+03   6.3000e+01   1.0000e+00

vander (c)\b  does indeed give the same result as the full matrix

   -1.0222e-05
    3.5786e-03
   -5.0372e-01
    2.9366e+01
   -2.6907e+02



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]