Create an array whose standard deviation we needĢ. In this example, we will find the standard deviation of elements of an array using ‘feval function’ We will need to follow the following 2 steps:ġ. Pass the function ‘mean’ as a string inside the function ‘feval’Īs we can see, by passing ‘mean’ as input argument to our ‘feval function’, we are able to get the mean of our input array. In this example, we will find the average of elements of an array using ‘feval function’ We will need to follow the following 2 steps:Ģ. Let us now understand how the code for ‘feval function’ looks like in MATLAB, with the help of various examples. Function parameter here must be name of a function, we cannot use path information. feval (function, inp1, inp2, …, inp M) will evaluate the value of ‘function’ at the input arguments.Ĥ. The name of the function is usually defined by M-fileģ. feval takes a function as its first argument, which is passed as a string (in quotes)Ģ.