[scilab-Users] linear extrapolation to abscissa

Stefan Du Rietz sdr at durietz.se
Wed Jan 14 23:56:08 CET 2009


1. get [a, b] in y = ax + b

   coefs = regress(x, y);

2. calculate x for y = 0 from
   y = ax + b
   x = (y-b)/a

with y = 0:
   x = -b/a
that is
   x = -coefs(1)/coefs(2)

Stefan


On 2009-01-14 23:25, e-letter wrote:
--------------------
> Readers,
> 
> I want to plot a least squares fit linear regression for the following data set:
> 
> x=0,5,10,15,20; y=16,45,77,101,125
> 
> Then I want to perform an extrapolation to obtain a value for x when
> y=0. How do I perform this please?
> 
> The documentation is very unfriendly to a statistics and scilab
> novice! First I tried to read about the interp function but didn't
> understand the spline references so moved to interpln instead. ;)
> 
> The help section should have stated that plot2d is prerequisite
> knowledge. So I read about plot2d. What does the function yi perform?
> What is the purpose of the apostrophe (') in the example shown in the help?
> 
> Yours,
> 
> scilab at conference.jabber.org
> 
> scilab 411
> mandriva 2008
> 



More information about the users mailing list