I made several functions like myfunc1.m , myfunc2.m, myfunc3.m and so on.
they all take one function and two doubles, and they output 2 arrays like this.
function [X Y] = myfunc3(f, a, b)
Im trying to make a new function that takes one of my functions as its argument. Expected outputs will be like this.
>> myNewfunc(@ myfunc3)
'It is my 3rd function!'
>> myNewfunc(@ myfunc2)
'It is my 2nd function!'
so I wrote like this to call a function in the new function
but it gets an error at the line of [X Y] = myfunc(f, a, b) and shows "Reference to a cleared variable myfunc."
How can I tell Matlab I am trying to call one of created functions in another function?
Thank you! and any help will be appreciated.