Home »
Public Forums »
archive »
Re: Slope of a graph
Re: Slope of a graph [message #66322] |
Sat, 02 May 2009 05:12 |
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?
|
|
|
Current Time: Wed Oct 08 19:59:30 PDT 2025
Total time taken to generate the page: 0.00556 seconds