From help-octave-request at bevo dot che dot wisc dot edu Fri Dec 27 17:53:07 2002 Subject: Re: Newbie question solving lin sys From: "William Lash" To: , "John B. Thoo" CC: Date: Fri, 27 Dec 2002 17:53:02 -0600 Try help format format long x ---------- Original Message ---------------------------------- From: John B. Thoo Date: Fri, 27 Dec 2002 15:10:15 -0800 >Bill (or others)--- > >I'm sorry, but I have at least one more question about this. I get this >for the list of coefficients when I enter in Octave > >octave:92> for i = [1:12] > > x(i) > > end >ans = 22 >ans = 129.32 >ans = -330.01 >ans = 356.74 >ans = -211.74 >ans = 77.512 >ans = -18.446 >ans = 2.9092 >ans = -0.30191 >ans = 0.019818 >ans = -7.4570e-04 >ans = 1.2250e-05 > >But these numbers lead to erroneous calculations. My question is, does >Octave keep track of more digits (greater precision) somehow when I use >x(1), x(2),... instead? > >Thanks again. > >---John. > > >On Friday, December 27, 2002, at 02:15 PM, William Lash wrote: > >> Whenever you type in the numbers for you calculation in s you are >> losing precision. Instead of typing in: >> >>> octave:55> 22 + 129.32*s - 330.01*s**2 + 356.74*s**3 - 211.74*s**4 + >>> 77.512*s**5 - 18.446*s**6 + 2.9092*s**7 - 0.30191*s**8 + >>> 0.019818*s**9 - >>> 0.0007457*s**10 + 0.00001225*s**11 >> >> Try the following: >> >> x(1)+x(2)*s+x(3)*s**2+x(4)*s**3+x(5)*s**4+x(6)*s**5+x(7)*s**6+x(8)*s**7+x( >> 9)*s**8+x(10)*s**9+x(11)*s**10+x(12)*s**11 > > ------------------------------------------------------------- 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 -------------------------------------------------------------