@jdelange wrote:
If
M
is a matrix, then I know I can apply a function on each element usingMap()
. So to applyTanh(x)
on each element ofM
, I can doM.Map(Math.Tanh)
. This works becauseTanh(x)
takes one parameter as input.What if my function to map takes more than one parameter? Say
Func(a, b, x)
, how would I map that?All I can think of now is pass
M
with parametersa
andb
to an in-between-function, do the map withouta
andb
inside that function, and then returnM
as the function output. I bet there is a nicer way to do this.
Posts: 3
Participants: 2