MATLAB的iptchecknargin函数详解!

来源:互联网 发布:淘宝大学 vip课退款 编辑:程序博客网 时间:2024/04/29 21:54

欢迎大家加入图像识别技术交流群:271891601,另外,特别欢迎成都从事图像识别工作的朋友交流,我的QQ号2487872782

iptchecknargin函数详解,这个函数在看别人写的M函数时很有用!

ipt是image process tools,即图像处理工具的缩写,MALAB里边有一个图像像处理工具箱,里边有一组函数的命名规则是在前面加上ipt

nargin是输入参数个数的意思,具体是怎么缩写而来的我不清楚

下面介绍查找其使用资料的方法!

首先在MATLAB的HELP中打开Product Help,然后搜索iptchecknargin,对这个函数的介绍就非常清楚了,我复制过来如下:

iptchecknargin
Check number of input arguments
Syntax
iptchecknargin(low, high, num_inputs, func_name)
Description
iptchecknargin(low, high, num_inputs, func_name) checks whether num_inputs is in the range indicated by low and high. If not, iptchecknargin issues a formatted error message.
low should be a scalar nonnegative integer.
high should be a scalar nonnegative integer or Inf.
func_name is a string that specifies the name used in the formatted error message to identify(指出,发现,识别) the function checking the handle.
Examples
iptchecknargin(1,3,nargin,mfilename);//mfilename是一个函数,会返回当前M文件的文件名

这里再搜索nargin,解释如下:

Nargin
Number of function arguments
Syntax
nargin
nargin(fun)
Description
In the body of a function, nargin indicates how many input arguments a user has supplied. ..........更多的自己去翻看文档吧!这句话已经说清楚了功能!

0 0
原创粉丝点击