[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mapping a scalar function over an array

From: Giulio Bottazzi
Subject: mapping a scalar function over an array
Date: Tue, 7 Mar 2000 12:06:55 +0100

Dear Octave users,
I've not found in the Octave manual (probably for my stupidity) a way of
"mapping" a scalar function over an array. What I mean is: given a function
defined for a (truly) scalar argument, for instance

function foo(x)
        integrate a given function between 0 and x 

and an array 


is there a way to obtain the array of results


with a single simple command? Something like: Map(foo,A)? ( this is approx. the
syntax I use on Mathematica).

Please, point me to the correct place in the manual if the answer is there and
forgive me for my silliness.

Thank you,

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]