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

Home » Public Forums » archive » Re: Slope of a graph
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: Slope of a graph [message #66322] Sat, 02 May 2009 05:12
jameskuyper is currently offline  jameskuyper
Messages: 79
Registered: October 2007
Member
d.poreh@gmail.com wrote:
> Folks
> I have an elevation distance plot (elevation-distance) in 2D and I
> want to calculate slope of this graph. For instance:
> DL> x=findgen(100)
> IDL> y=exp(-x)
> I need to calculate the slope of this graph in 100 points
> (corresponding to x). I tested DERIV function but seem shows incorrect
> results! In our example for low x we have high slope and for high x
> slopes are decreasing.

The slope of exp(-x) is -exp(-x), which start out with a value -1 at
x=0, and gets smaller for large x. With a spacing of 1 you can't get
very accurate values for the derivative using DERIV, but it should show
the same pattern. Is that what you are seeing?
[Message index]
 
Read Message
Previous Topic: Spherical surface plot
Next Topic: Re: 2D analogue of the WHERE function?

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

Current Time: Fri Oct 10 02:30:17 PDT 2025

Total time taken to generate the page: 0.40065 seconds