Am 11.04.19 um 17:51 schrieb Allin Cottrell:
On Thu, 11 Apr 2019, Riccardo (Jack) Lucchetti wrote:
> On Thu, 11 Apr 2019, Sven Schreiber wrote:
>
>> Speaking about arrays and the extra package: I don't want to hijack
>> your
>> thread, but I've thought that a function would be useful that takes an
>> array argument and applies some operation (another function)
>> automatically to all elements of the array.
>
> Something like this, you mean?
>
> <hansl>
> function matrices apply(const matrices A, string op)
> n = nelem(A)
> matrices ret = array(n)
> loop i = 1 .. n --quiet
> ret[i] = feval(op, A[i])
> endloop
> return ret
> end function
Just out of curiosity: Gretl wouldn't compute stuff in parallel
out-of-box, right?
Ah yes, feval(). I guess that should be documented!
feval() is indeed a very nice
function!
Best,
Artur