addpath C:\murphyk\matlab\BNT add_BNT_to_path format compact dbstop if error dbstop if warning
[a,b] = f(x, y, 'arg1', 55, 'arg3', 66) [a,b] = function f(x, y, varargin) [a1, a2, a3] = process_options(varargin{:}, ... 'arg1', 1, 'arg2', 2, 'arg3', 3);Will pass in named arguments arg1 and arg3 to f; the remaining arguments will be set to their default values ( in this case, arg2 gets set to 2).