Matlab inline VS anonymous functions

Chad picture Chad · Aug 15, 2013 · Viewed 6.9k times · Source

Is there a good reason to choose between using inline functions vs anonymous functions in MATLAB? This exact question has been asked and answered here, but the answer is not helpful for rookie MATLAB users because the code snippets are incomplete so they do not run when pasted into the MATLAB command window. Can someone please provide an answer with code snippets that can be pasted into MATLAB?

Answer

Dan picture Dan · Aug 15, 2013

Anonymous functions replaced inline functions (as mentioned in both the docs and in the link you posted)

The docs warn:

inline will be removed in a future release. Use Anonymous Functions instead.