[scilab-Users] Re: linear extrapolation to abscissa

Stefan Du Rietz sdr at durietz.se
Thu Jan 15 00:46:15 CET 2009


Sorry,
These (indented!) are the only commands you should enter 
(the other lines were meant to be explanations):

1. The first command gives a vector coefs, which contains [a, b]
a = coefs(1)
b = coefs(2)

   coefs = regress(x, y);

2. The second command uses these: coefs(1) (which is a) and 
coefs(2) (which is b) to compute x when y = 0 by rearranging 
the first equation (y = ax + b):

   x = -coefs(1)/coefs(2)

I hope that you should be able to understand (or at least 
use) what I wrote (trying to explain) earlier with this 
addition.

Stefan

PS  You have to know some basic mathematics to use Scilab... ;-)


On 2009-01-15 00:15, e-letter wrote:
--------------------
>> 1. get [a, b] in y = ax + b
> Entering this into the scilab command resulted in error 276
>>   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)
> 
> Please explain in full detail; I do not understand any of what you wrote!
> 



More information about the users mailing list