Duplicated @dynSeries/disp code in @dynSeries/display (so that the name of the dynSeries objected is correctly printed in the command window).

time-shift
Stéphane Adjemian (Charybdis) 2013-06-26 16:10:56 +02:00
parent b3cfc330e9
commit ddc57885c5
1 changed files with 19 additions and 1 deletions

View File

@ -18,4 +18,22 @@ function display(A)
%! @end deftypefn
%@eod:
disp(A)
separator = repmat(' | ',A.nobs+1,1);
vspace = ' ';
TABLE = ' ';
for t=1:A.nobs
TABLE = char(TABLE, format(A.time(t)));
end
for i = 1:A.vobs
TABLE = horzcat(TABLE,separator);
tmp = A.name{i};
for t=1:A.nobs
tmp = char(tmp,num2str(A.data(t,i)));
end
TABLE = horzcat(TABLE, tmp);
end
disp(vspace)
disp([inputname(1) ' is a dynSeries object:'])
disp(vspace);
disp(TABLE);
disp(vspace);