Changed behaviour of @dynSeries/size.
If called with a second input argument (dim), size returns the number of observations if dim==1 or the number of variables if dim==2. Without this second argument, size returns the number of observations and the number of variables.time-shift
parent
077f98445b
commit
9f117f9d00
|
@ -1,4 +1,4 @@
|
|||
function [a,b] = size(c)
|
||||
function [a,b] = size(c,dim)
|
||||
|
||||
% Copyright (C) 2013 Dynare Team
|
||||
%
|
||||
|
@ -18,4 +18,21 @@ function [a,b] = size(c)
|
|||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
a = c.nobs;
|
||||
b = c.vobs;
|
||||
b = c.vobs;
|
||||
|
||||
if nargin>1
|
||||
if nargout>1
|
||||
error('dynSeries::size: Wrong calling sequence!')
|
||||
end
|
||||
switch dim
|
||||
case 1
|
||||
a = c.nobs;
|
||||
case 2
|
||||
a = c.vobs;
|
||||
otherwise
|
||||
error(['dynSeries::size: Wrong calling sequence! Argument ''' inputname(2) ''' must be equal to 1 or 2.' ])
|
||||
end
|
||||
else
|
||||
a = c.nobs;
|
||||
b = c.vobs;
|
||||
end
|
Loading…
Reference in New Issue