How to deal with name/value pairs of function arguments in MATLAB
I prefer using structures for my options. This gives you an easy way to store the options and an easy way to define them. Also, the whole thing becomes rather compact. function example(varargin) %# define defaults at the beginning of the code so that you do not need to %# scroll way down in case … Read more