nargin

Number of input arguments

Usage

nargin

nargin(name)

nargin(h)

Examples

Input
function [a,b] = f(c,d,e)
disp('Number of input given:')
nargin
a = c;
b = d;
end

Running f(1,2); gives the following output.

Output
Number of input given:

ans = 
 2.0000
Input
nargin('f')
Output
ans =
3.000