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

Home » Public Forums » archive » Anonymous Math Functions in IDL like Matlab
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: Anonymous Math Functions in IDL like Matlab [message #75324 is a reply to message #75264] Fri, 25 February 2011 08:16 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 2/24/11 8:32 pm, nata wrote:
> I am just curious. What does the expression "sqrt = @(x) x.^2" means ?

It's a lambda function, or anonymous function, a way of specifying a
function without naming it, i.e., to use inline only once.

For example, see how Python does this:

http://diveintopython.org/power_of_introspection/lambda_func tions.html

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Plotimage and non-byte images
Next Topic: Re: Read ASCII File with tab seperator

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

Current Time: Sat Oct 11 05:26:36 PDT 2025

Total time taken to generate the page: 0.47964 seconds