United States
United States
Canada
Australia
Österreich
Belgium
中国
Denmark
Finland
France
Deutschland
India
Ireland
Italia
日本
한국
Luxembourg
Netherlands
New Zealand
Norway
Portugal
España
Sweden
Schweiz / Suisse
United Kingdom
All Other Countries
Contact Us
Store
Create Account
Log In
Accelerating the pace of engineering and science
Products & Services
Solutions
Academia
Support
User Community
Events
Company
Documentation Center
Trial Software
Product Updates
Share
Contents
Documentation Center
MATLAB
Getting Started with MATLAB
Examples
Release Notes
MATLAB Functions
Language Fundamentals
Mathematics
Graphics
Programming Scripts and Functions
Control Flow
Scripts
Functions
Function Basics
Input and Output Arguments
Functions
nargin
nargout
varargin
varargout
narginchk
nargoutchk
validateattributes
validatestring
inputParser
inputname
Examples and How To
Find Number of Function Arguments
Support Variable Number of Inputs
Support Variable Number of Outputs
Validate Number of Function Arguments
Ignore Function Inputs
Check Function Inputs with validateattributes
Parse Function Inputs
Concepts
Argument Checking in Nested Functions
Input Parser Validation Functions
Variables
Error Handling
Debugging
Coding and Productivity Tips
Programming Utilities
Data and File Management
GUI Building
Advanced Software Development
Desktop Environment
Search MATLAB Documentation
R2013a
MATLAB
Programming Scripts and Functions
Functions
Input and Output Arguments
Support variable length argument lists, check arguments
MATLAB Functions
nargin
Number of function input arguments
nargout
Number of function output arguments
varargin
Variable-length input argument list
varargout
Variable-length output argument list
narginchk
Validate number of input arguments
nargoutchk
Validate number of output arguments
validateattributes
Check validity of array
validatestring
Check validity of text string
inputParser
Parse function inputs
inputname
Variable name of function input
Examples and How To
Find Number of Function Arguments
Support Variable Number of Inputs
Support Variable Number of Outputs
Validate Number of Function Arguments
Ignore Function Inputs
Check Function Inputs with validateattributes
Parse Function Inputs
Concepts
Argument Checking in Nested Functions
Input Parser Validation Functions
Was this topic helpful?