Skipping outputs with anonymous function in MATLAB
There’s no way I know of within the expression of the anonymous function to have it select which output to return from a function with multiple possible output arguments. However, you can return multiple outputs when you evaluate the anonymous function. Here’s an example using the function MAX: >> data = [1 3 2 5 … Read more