I have a function named sample as follows:
function x= sample(*func_f*)
It takes in input another function which is to be processed. Now in another matlab file, I access all the files in one directory (which are functions) and i need to pass them into this sample function.
I use the following approach for this:
T=dir(['./' fcts_folder '/*.m']);
x= sample( str2func(funcname) )
But this gives me an error : Undefined function 'sample' for input arguments of type 'function_handle'.
Any ideas how I should go about this?