I want to perform a function_handle in Julia as MATLAB does. Suppose I create a function in MATLAB like this:
fn = @(b, x) process(b, x, @trans);
And then I put this function as input of another function function m = AnotherFunc(m, l, func)
where m is a matrix by:
m = AnotherFunc(m, l, fn);
And in this AnotherFunc, I should use the function I created as
m(a:b,c) = func(m(a:b,c), d);
How can I perform this via Julia?
For these 3 I wrote these in Julia:
fn = (b,x) -> process(b, x, trans);
m = AnotherFunc(m, l, fn);
m[a:b,c] = func(m[a:b,c], d);
Then shows ArgumentError: invalid index: 3.0 of type Float64
I want to write something can perform the same as in MATLAB.