Changed isint function.
To make it consistent with the routine available in the dates toolbox.time-shift
parent
634b11de70
commit
8eb3023069
|
@ -1,4 +1,4 @@
|
||||||
function [b,c,d] = isint(a)
|
function [l,c,d] = isint(a)
|
||||||
% This function tests if the input argument is an integer.
|
% This function tests if the input argument is an integer.
|
||||||
%
|
%
|
||||||
% INPUT
|
% INPUT
|
||||||
|
@ -33,7 +33,7 @@ function [b,c,d] = isint(a)
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
if ~isnumeric(a)
|
if ~isnumeric(a)
|
||||||
b = false;
|
l = false;
|
||||||
if nargout>1
|
if nargout>1
|
||||||
c = [];
|
c = [];
|
||||||
d = [];
|
d = [];
|
||||||
|
@ -41,11 +41,9 @@ if ~isnumeric(a)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
[m,n] = size(a);
|
l = abs(fix(a)-a)<1e-15;
|
||||||
|
|
||||||
b = abs(fix(a)-a)<1e-15;
|
|
||||||
|
|
||||||
if nargout>1
|
if nargout>1
|
||||||
c = find(b==1);
|
c = find(l==true);
|
||||||
d = find(b==0);
|
d = find(l==false);
|
||||||
end
|
end
|
Loading…
Reference in New Issue