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

Home » Public Forums » archive » Re: Differentiation in IDL
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: Differentiation in IDL [message #50644 is a reply to message #50643] Mon, 16 October 2006 07:26 Go to previous messageGo to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Dear All,

Surely when you type:

dx = DERIV(x * !dtor,data)

you're actually doing:

d/d(x*!dtor) (sin(x*!dtor))

which is:

cos(x*!dtor)

i.e. you shouldn't need to divide the result by !dtor.

Of course, declaring x as findgen(360)*!dtor to start with looks a lot
cleaner and is probably easier to follow, but I don't think what was
suggested by Wox gives the wrong answer.

Thanks,

Allan

Braedley wrote:
> Also, d/dx(f(g(x)))=f'(g(x))*g'(x) (chain rule), so in your case,
> d/dx(sin(x*!dtor))=cos(x*!dtor)*!dtor
> If you divide the result from DERIV by !dtor, you'll get the result
> you're looking for. My suggestion would be to declare x as
> x=findgen(360)*!dtor
> to begin with.
>
> Cheers
>
>
> David Fanning wrote:
>
>> David Fanning writes:
>>
>>
>>> Wox writes:
>>>
>>>
>>>> Specify x?
>>>>
>>>> dx = DERIV(x * !dtor,data)
>>>
>>> Oh, sorry.
>>>
>>> x = findgen(360)
>>>
>>> David
>>>
>>
>> Oh, sorry. I misunderstood. Yes, this does it. Thank you!
>>
>> 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.")
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Differentiation in IDL
Next Topic: Re: Basic format code question

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

Current Time: Fri Oct 10 18:10:08 PDT 2025

Total time taken to generate the page: 0.16659 seconds