matlab帮助系统中的说明:
Functions
The main difference between a script and a function is thata function accepts input from and returns output to its caller, whereasscripts do not. You define MATLAB functions in a file that beginswith a line containing the function keyword. You cannot define a function within a script file or at the MATLAB commandline.
Functions always begin with a function definition line andend either with the first matching end statement,the occurrence of another function definiti