MATLAB's anonymous functions provide an easy way to specify a function. An anonymous function is a function defined without using a separate function file. It is a MATLAB feature that lets you define a mathematical expression of one or more inputs and either assign that expression to a function. This method is good for relatively simple functions that will not be used that often and that can be written in a single expression.
The inline command lets you create a function of any number of variables by giving a string containing the function followed by a series of strings denoting the order of the input variables. It is similar to an Anonymous Function