Re: list trouble [message #79082] |
Fri, 27 January 2012 05:22 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Alice Pasetto writes:
> I have a little problem with IDL
> I have a list in which I have two columns: time data in the first and
> in the second I have calibration factors,but some of these last values
> are zero and I don't want to plot out or I can plot them but the
> important things is that these points should not be included in the
> linfit routine...
goodPts = Where(calib NE 0, count)
IF count EQ 0 THEN Message, 'No Valid Calibration Points'
cooef = LinFit(time[goodpts], calib[goodPts], YFIT=yfit)
cgPlot, time, calib, PSYM=2
cgPlot, time[goodPts], yfit, /OPlot, Color='red'
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|