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
[...]
Ah yes, feval(). I guess that should be documented!
Allin