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

Home » Public Forums » archive » Differentiation in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Differentiation in IDL [message #50650] Mon, 16 October 2006 06:49
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

OK, I'm missing something crucial here.

Suppose I have a sine function:

x = Findgen(360)
data = Sin(x * !dtor)
Plot, data

I know that d/dx(sin(x)) = cos(x). So, I would expect
a cosine looking curve if I differentiate the data above.

dx = DERIV(data)
OPlot, dx, Linestyle=2

The differentiated curve is almost a straight line! One
could argue that it might have the correct cosine *shape*
(squint your eyes a little bit), but the scale is vastly
different. How come?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Basic format code question
Next Topic: Re: Differentiation in IDL

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

Current Time: Sat Oct 11 05:28:09 PDT 2025

Total time taken to generate the page: 0.64266 seconds