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

Home » Public Forums » archive » Re: Calculate gradient
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: Calculate gradient [message #70084 is a reply to message #70082] Fri, 12 March 2010 14:40 Go to previous messageGo to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
Perhaps it would be better to use Deriv() or something like that,
instead of differences.

cheers,
bob

>
> "Paolo" <pgrigis@gmail.com> wrote in message
> news:b7420af6-f104-4e00-968c-28afc378f8ac@g26g2000yqn.google groups.com...
> Hi,
>
> the simpler solution would be to use the "shift" function
> to calculate the dx and dy component of the gradient (whose
> norm is sqrt(dx^2+dy^2) - similarly to the one-dimensional
> case when you can compute the numerical derivative of x
> as (x-shift(x,-1))/dx.
>
> However you should be careful doing that with non-smooth
> datasets.
>
> Ciao,
> Paolo
>
>
>
> On Mar 12, 4:41 pm, mslarkin <enhlw...@gmail.com> wrote:
>> Hi IDL experts,
>> I have a 2-D array (2708x4060), containing reflectance data. Is it
>> possible to calculate the reflectance gradient (i.e. the rate of
>> reflectance change over distance or array grid) throughout the array,
>> and then draw lines of equal gradient (note that they�re NOT contour
>> lines)?
>> Thank you very much for your help!
>> IDL beginner
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Proper Map Label Clipping
Next Topic: rejecting a few pixel values from an array of pixel values

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

Current Time: Sat Oct 11 04:11:23 PDT 2025

Total time taken to generate the page: 0.79742 seconds