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

Home » Public Forums » archive » what is the dist function's mean?
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: what is the dist function's mean? [message #43739 is a reply to message #43549] Fri, 22 April 2005 14:07 Go to previous messageGo to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
lixiaoyao wrote:
> Is there anybody who can explain the dist for me?
> I know dist(100) generate a 100X100 matrix,but what is the value for
> it
> come from? In the help file,they said it is the frequency,but I do not
> understand.
> also,what is the purpose for this function?
> Thanks a lot
>

Maybe we should admit that the manual doesn't do a good job of
explaining this function.

Dist will always return a 2-d array. "Frequency" is meant in the context
of Fourier Transforms (and maybe others). If you F.T. a 2-d array, you
can use DIST() to create an array with the spatial frequencies
corresponding to the F.T. array. The division into quadrants comes from
the way the FFT() function arranges its result. Check the help entry for
FFT for more information.

If you SHIFT() the result of DIST() by (n/2, n/2), you get an array
where each pixel value is equal to the distance from the center. This is
useful to create arrays with circular symmetry (like circular apertures).

Benjamin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reading HDF5 Compound Datasets in IDL
Next Topic: IDL nested structures in Callable IDL

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

Current Time: Sat Nov 29 11:32:37 PST 2025

Total time taken to generate the page: 1.04120 seconds