Changed dseries' constructor so that the third and fourth inputs arguments accept cell of strings *and* character arrays.
=> It is possible to pass M_.endo_names as a third input argument.time-shift
parent
8956bddeba
commit
4e1c26db76
|
@ -9561,10 +9561,10 @@ A scalar integer, the number of observations.
|
||||||
A scalar integer, the number of variables.
|
A scalar integer, the number of variables.
|
||||||
|
|
||||||
@item name
|
@item name
|
||||||
A cell of strings, the names of the variables.
|
A @code{nobs}*1 cell of strings or a @code{nobs}*p character array, the names of the variables.
|
||||||
|
|
||||||
@item tex
|
@item tex
|
||||||
A cell of strings, the tex names of the variables.
|
A @code{nobs}*1 cell of strings or a @code{nobs}*p character array, the tex names of the variables.
|
||||||
|
|
||||||
@item freq
|
@item freq
|
||||||
A scalar integer equal to 1, 4, 12 or 52, the frequency of the dataset.
|
A scalar integer equal to 1, 4, 12 or 52, the frequency of the dataset.
|
||||||
|
|
|
@ -22,9 +22,9 @@ function ts = dseries(varargin) % --*-- Unitary tests --*--
|
||||||
%! @item b
|
%! @item b
|
||||||
%! Initial date. For Quaterly, Monthly or Weekly data, b must be a string. For yearly data or if the frequence is not defined b must be an integer.
|
%! Initial date. For Quaterly, Monthly or Weekly data, b must be a string. For yearly data or if the frequence is not defined b must be an integer.
|
||||||
%! @item c
|
%! @item c
|
||||||
%! N*1 cell array of strings. Names of the N time series.
|
%! N*1 cell array of strings or N*q array of strings. Names of the N time series.
|
||||||
%! @item d
|
%! @item d
|
||||||
%! N*p array of characters. TeX names of the N time series.
|
%! N*1 cell array of strings or N*p array of characters. TeX names of the N time series.
|
||||||
%! @end table
|
%! @end table
|
||||||
%! @sp 2
|
%! @sp 2
|
||||||
%! @strong{Outputs}
|
%! @strong{Outputs}
|
||||||
|
@ -162,11 +162,17 @@ switch nargin
|
||||||
d = {};
|
d = {};
|
||||||
else
|
else
|
||||||
d = varargin{4};
|
d = varargin{4};
|
||||||
|
if ~iscell(d)
|
||||||
|
d = cellstr(d);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if nargin<3
|
if nargin<3
|
||||||
c = {};
|
c = {};
|
||||||
else
|
else
|
||||||
c = varargin{3};
|
c = varargin{3};
|
||||||
|
if ~iscell(c)
|
||||||
|
c = cellstr(c);
|
||||||
|
end
|
||||||
end
|
end
|
||||||
% Get data, number of observations and number of variables.
|
% Get data, number of observations and number of variables.
|
||||||
ts.data = a;
|
ts.data = a;
|
||||||
|
|
Loading…
Reference in New Issue