Remplace nargchk by nargincheck problem

3 次查看(过去 30 天)
Hello,
It's not a big problem, it's just to remove this annoying and spamming warning : "Warning: NARGCHK will be removed in a future release. Use NARGINCHK or NARGOUTCHK instead. "
So I come to the old function and remplace that:
function result = lbp(varargin)
error(nargchk(1,5,nargin));
By that:
function result = lbp(varargin)
error(narginchk(1,5));
That give "Error: nargincheck does not return any values" Where I doing wrong?
Thank you!

采纳的回答

Jos (10584)
Jos (10584) 2016-6-3
Just use
narginchk(inmin,inmax)
No need for using error.

更多回答(1 个)

SHRISTI TIWARI
SHRISTI TIWARI 2019-10-26
code as
function [UffDataSets, Info, errmsg] = readuff(varargin)
error(nargchk(1, 4, nargin));
i am getting
>> readuff
Error using readuff (line 267)
Not enough input arguments.
please help me in that.

类别

Help CenterFile Exchange 中查找有关 Argument Definitions 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by