From 0e5819ee383360af23d7cccc00d52c149b1c4ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Wed, 26 Jun 2013 16:10:56 +0200 Subject: [PATCH] Duplicated @dynSeries/disp code in @dynSeries/display (so that the name of the dynSeries objected is correctly printed in the command window). --- matlab/@dynSeries/display.m | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/matlab/@dynSeries/display.m b/matlab/@dynSeries/display.m index 0ed25caaf..66c502beb 100644 --- a/matlab/@dynSeries/display.m +++ b/matlab/@dynSeries/display.m @@ -18,4 +18,22 @@ function display(A) %! @end deftypefn %@eod: -disp(A) \ No newline at end of file +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); \ No newline at end of file