The different function signatures are imported automatically from the comments of that function. Using VARARGIN or not is not relevant, only the data that is contained in the comments is relevant.
Here's an example:
function [varargout] = testfunc(varargin)
% TESTFUNC Function description goes here.
% A = testfunc(A, B) Test signature 1.
% Continued from first signature.
%
% A = testfunc(A, B, X, Y) Test signature 2.
%
% A = testfunc(A, B, X, Y, Z) Test signature 3.
%
% A = testfunc_TEST(A, B) This will be ignored because the function name does not match.
Best Answer