An M-file consists of a sequence of normal MATLAB statements, which possibly include references to other M-files. An M-file can call itself recursively. You can create M-files using a text editor or word processor. Two types of M-files can be used: script and function. Script, or script files, automate long sequences of commands. Functions, or function files, provide extensibility to MATLAB. They allow you to add new functions to existing function. Much of the power of MATLAB derives from this ability to create new function that solve user-specific problems. Both scripts and functions are ordinary ASCII text files.
基于1个网页-相关网页
Hence, with no password entered, the function is passed an uninitialized variable and a script error results.
因此,若无密码键入,传递到该函数的是未初始化的变量和脚本错误结果。
So now you have looked at how parameters are passed into a function or script and how to identify options. Now to start processing the options and parameters.
您已经了解了如何将参数传递给函数或脚本以及如何识别选项,现在开始处理选项和参数。
To keep administrators or developers from constantly having to modify a script to work a certain way with other values, use variables and supply arguments to the script or function.
这迫使管理员或开发人员不得不经常修改脚本以使用其他值;为了避免这个问题,应该使用变量并为脚本或函数提供参数。
应用推荐