diff --git a/FalsePosition.m b/FalsePosition.m index 24be32c..4b274a7 100644 --- a/FalsePosition.m +++ b/FalsePosition.m @@ -5,7 +5,7 @@ function [xList, errorList] = FalsePosition(f, p0, p1, errorAllowed) % %Make sure the number of arguments is correct - if(narginchk(4, 4)) + if(nargin ~= 4) error('That is an incorrect number of arguments') end %A few necesary before we begin diff --git a/Mullers.m b/Mullers.m index b758c95..a14e90d 100644 --- a/Mullers.m +++ b/Mullers.m @@ -5,7 +5,7 @@ function [xList, functionValueList] = Mullers(f, p0, p1, p2, errorAllowed) % %Make sure the number of arguments is correct - if(narginchk(5,5)) + if(nargin ~= 5) error('That is an incorrect number of arguments') end %A few necesary things before we get started diff --git a/NewNewton.m b/NewNewton.m index 8e07c1d..35a9ea3 100644 --- a/NewNewton.m +++ b/NewNewton.m @@ -5,7 +5,7 @@ function [xList, errorList] = NewNewton (f, startingValue, errorAllowed) % %Make sure the number of arguments is correct - if(narginchk(3,3)) + if(nargin ~= 3) error('That is an incorrect number of arguments') end %A few necesary things before we get started diff --git a/Secant.m b/Secant.m index 0a5bd10..90559bd 100644 --- a/Secant.m +++ b/Secant.m @@ -5,7 +5,7 @@ function [xList, errorList] = Secant(f, p0, p1, errorAllowed) % %Make sure the number of arguments is correct - if(narginchk(4,4)) + if(nargin ~= 4) error('That is an incorrect number of arguments') end %A few necesary things before we get started