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

Home » Public Forums » archive » How to apply a function to an array?
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: How to apply a function to an array? [message #44097 is a reply to message #43998] Fri, 13 May 2005 02:05 Go to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
W. Eremeev wrote:
> Suppose, I have a function with one scalar argument, returning a scalar
> and an array of values.
> I want to get another array with the same dimensions, containing
> results of application of my function to the values in the first array.
>
> R (www.r-project.org) has such functions (apply, lapply, sapply).
> They take vectors or matrices and functions as arguments and return
> arrays.
>
> What about IDL?
>
R is a functional programming language whereas IDL not. This means the
working philosophy is pretty diferent.

Sorry :(, but I dont know if there is a function or procedure in IDL
that executes an specified function over a set of data. Perhaps you must
think in terms of loops.

--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDLitComponent - Introspection
Next Topic: Re: problem with save

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

Current Time: Thu Oct 09 20:25:57 PDT 2025

Total time taken to generate the page: 1.35814 seconds