Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I return a function as an output value in MATLAB?

Tags:

People also ask

Can a function return in MATLAB?

return forces MATLAB® to return control to the invoking program before it reaches the end of the script or function. The invoking program is a script or function that calls the script or function containing the call to return .

What is output function in MATLAB?

An output function is a function that an optimization function calls at each iteration of its algorithm. Typically, you use an output function to generate graphical output, record the history of the data the algorithm generates, or halt the algorithm based on the data at the current iteration.


I am writing a function makeFunction(data). I want it to return a function, not a matrix, vector, or scalar. How do I do this?