Take a closer look at your data. It's a vertical line so the slope will be infinite.
> Message: 1 > Date: Sat, 9 Jun 2012 00:05:04 -0700 (PDT) > From: Ruchin Kansal <[email protected]> > To: "[email protected]" <[email protected]> > Cc: "[email protected]" <[email protected]> > Subject: [Help-gsl] Doubt (bug?) in gsl_fit_linear function > Message-ID: > <[email protected]> > Content-Type: text/plain; charset=us-ascii > > Hi, > > I am using gsl_fit_linear to fit a straight line through my data samples. > Incidentally, I came across a situation when > the data samples lie on a vertical line. I observed that in this case > gsl_fit_linear returns everything as (nan). Is it a known behavior or there > may be something wrong at my end? > > I passed the following data samples to this function: > {(50, 52), (50, 50), (50, 53), (50, 49), (50, 51)} >
