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

Home » Public Forums » archive » Derivatives
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: Derivatives [message #86565 is a reply to message #86555] Tue, 19 November 2013 18:45 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, November 19, 2013 2:49:53 AM UTC-8, Mats Löfdahl wrote:
> Den tisdagen den 19:e november 2013 kl. 11:20:40 UTC+1 skrev fd_...@mail.com:
>
>> Hi
>
>>
>
>> I want to use the simple differentiation formula instead of DERIV function( 3-point, Lagrangian interpolation):
>
>>
>
>> Derivative=change in y/change in x
>
>>
>
>> I wrote my code like this but my results are absolutely wrong and I don't see where my mistake is.
>
>>
>
>> derivative= (A[1:*]-A)/ (t[1:*]-t)
>
>> derivative=[0,derivative]
>
>
>
> Looks OK to me. In what way is the result "absolutely wrong"?
>
>
>
>
>
>> I did the last step i.e. derivative=[0,derivative] because I need an array[2001,1] instead of array[2000,1].
>
>
>
> I'm not sure why you expect a two-dimensional array but adding an element seems appropriate, since you removed one by doing selecting 1:*. I don't know how much sense it makes to add a zero (derivative =[derivative[0],derivative] might be more useful) but you are the only who knows your data.

Why is the original poster deleting their messages? Deleting significantly decreases the value of the discussion.

And why would responders be kind enough to help, if they know the original poster's messages would be deleted, leaving the responders' messages to be taken out of context?

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Time conversion for .nc file
Next Topic: _EXTRA KEYWORD

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

Current Time: Fri Oct 10 22:31:54 PDT 2025

Total time taken to generate the page: 1.03944 seconds