comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: list trouble
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: list trouble [message #79082] Fri, 27 January 2012 05:22
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Previous Topic: Re: ENVI Classification File
Next Topic: cgWindow error when I save as a raster image

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:26:37 PDT 2025

Total time taken to generate the page: 0.56345 seconds