Commit 5d5f6257 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Do not display all the observations if a dynSeries object has more than forty observations.

parent 686e3322
......@@ -17,21 +17,47 @@ function display(A)
%! None
%! @end deftypefn
%@eod:
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};
if A.nobs<=40
separator = repmat(' | ',A.nobs+1,1);
for t=1:A.nobs
tmp = char(tmp,num2str(A.data(t,i)));
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
else
n = 10;
separator = repmat(' | ',2*n+3,1);
for t=1:n
TABLE = char(TABLE, format(A.time(t)));
end
TABLE = char(TABLE,vspace);
for t = A.nobs-n: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:10
tmp = char(tmp,num2str(A.data(t,i)));
end
tmp = char(tmp,vspace)
for t=A.nobs-10:A.nobs
tmp = char(tmp,num2str(A.data(t,i)));
end
TABLE = horzcat(TABLE, tmp);
end
TABLE = horzcat(TABLE, tmp);
end
disp(vspace)
disp([inputname(1) ' is a dynSeries object:'])
disp(vspace);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment