1function disp(o)
2
3% Overloads disp method.
4%
5% INPUTS
6% - o  [dseries]   Object to be displayed.
7%
8% OUTPUTS
9% None
10
11% Copyright (C) 2011-2017 Dynare Team
12%
13% This file is part of Dynare.
14%
15% Dynare is free software: you can redistribute it and/or modify
16% it under the terms of the GNU General Public License as published by
17% the Free Software Foundation, either version 3 of the License, or
18% (at your option) any later version.
19%
20% Dynare is distributed in the hope that it will be useful,
21% but WITHOUT ANY WARRANTY; without even the implied warranty of
22% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23% GNU General Public License for more details.
24%
25% You should have received a copy of the GNU General Public License
26% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
27
28vspace = ' ';
29
30if ~vobs(o)
31    disp(vspace)
32    disp([inputname(1) ' is an empty dseries object.'])
33    return
34end
35
36separator = repmat(' | ', nobs(o)+1,1);
37TABLE = ' ';
38for t=1:nobs(o)
39    TABLE = char(TABLE, date2string(o.dates(t)));
40end
41for i = 1:vobs(o)
42    TABLE = horzcat(TABLE,separator);
43    tmp = o.name{i};
44    for t=1:nobs(o)
45        tmp = char(tmp,num2str(o.data(t,i)));
46    end
47    TABLE = horzcat(TABLE, tmp);
48end
49disp(vspace)
50disp([inputname(1) ' is a dseries object:'])
51disp(vspace);
52disp(TABLE);
53disp(vspace);