I'm trying to apply a function I wrote to each element in a matrix using arrayfun, but I'm either using the wrong function or getting my syntax wrong.
I've written a function with 3 inputs, 1 output and saved it to an m file in the same directory. I'd like to call that function, with 1 input being an element in the matrix and the 2 remaining inputs being set, and get an output matrix.
My code looks like:
fun = @(x) my_function(x,input2,input3);
B = arrayfun(@(x) fun, A)
I get the following error
Error using arrayfun function_handle output type is not currently implemented.