Stéphane Adjemian (Charybdis)
f14db386c6
Added missing case for set_names in subsref. This commit and the previous one fix the bug in @dynSeries::set_names method reported at http://www.dynare.org/stepan/dynare/tests/report-f4c01a43bc2882e7fd18f3cd82344fff9644088c.log .
2013-09-06 16:27:25 +02:00
Stéphane Adjemian (Charybdis)
e641cdd455
Fixed unitary tests. If not specified, the name a variable in a dynSeries object is not '--NaN--' but 'Variable_xx' where x is the number of the variable.
2013-09-06 16:27:25 +02:00
Stéphane Adjemian (Charybdis)
f4c01a43bc
Introduce new syntax for shifting backward or forward a dynSeries object.
...
Suppose that ts is a dynSeries object and let
t = dynTimeIndex();
Then
us = ts.lag(); <=> us = ts(t-1);
us = ts.lag(2); <=> us = ts(t-2);
us = ts.lead(); <=> us = ts(t+1);
Added corresponding unitary test.
2013-09-05 17:46:04 +02:00
Stéphane Adjemian (Charybdis)
feff44fe79
Added dynSeries::lead method.
2013-09-05 16:51:10 +02:00
Stéphane Adjemian (Charybdis)
1edb4c6d9a
Added condition on dynSeries::lag method (input must be positive).
2013-09-05 16:50:27 +02:00
Stéphane Adjemian (Charybdis)
2975350319
Fixed typo (cosmetic).
2013-09-05 16:49:44 +02:00
Stéphane Adjemian (Charybdis)
c9c0a25538
Added missing semicolon and deleted trailing whitespaces.
2013-09-05 12:31:37 +02:00
Stéphane Adjemian (Charybdis)
12fc7a4241
Cosmetic changes. Removed useless curly braces and deleted trailing white spaces.
2013-09-05 12:17:55 +02:00
Stéphane Adjemian (Charybdis)
02eb19fb49
Fixed bug. Added missing case for calls to the dynSeries::lag method.
2013-09-05 12:16:07 +02:00
Stéphane Adjemian (Charybdis)
b76b0c8add
Moved the commented first line, used to declare that the routine has unitary tests, after the declaration of the function, otherwise help is not displayed.
2013-09-05 11:34:19 +02:00
Stéphane Adjemian (Charybdis)
5d5f6257d5
Do not display all the observations if a dynSeries object has more than forty observations.
2013-09-03 17:54:18 +02:00
Stéphane Adjemian (Charybdis)
686e3322e9
Added unitary test.
2013-09-03 16:39:13 +02:00
Stéphane Adjemian (Charybdis)
7dfbb903ea
Check that size and save methods (dynSeries) come in last position.
2013-09-03 16:39:02 +02:00
Stéphane Adjemian (Charybdis)
a15cf73a3e
Changed the syntax so that the difference between calling a member or a method is more explicit (dynSeries).
2013-09-03 16:07:38 +02:00
Sébastien Villemot
6414889ee6
Remove spurious keyboard() call
2013-08-12 11:30:28 +02:00
Houtan Bastani
7d1899df20
dynSeries: fix scalar subtraction for octave
2013-07-22 17:02:13 -04:00
Houtan Bastani
2955232780
dynSeries: add scalar addition
2013-07-18 14:50:32 -04:00
Houtan Bastani
1853d20daf
dynSeries: add scalar subtraction
2013-07-18 14:27:09 -04:00
Stéphane Adjemian (Charybdis)
f2d0da4d80
Merge branch 'master' into experimental-unitary-tests
2013-07-05 14:28:56 +02:00
Stéphane Adjemian (Charybdis)
141d720b77
Fixed error in copyright.
2013-07-05 13:56:48 +02:00
Stéphane Adjemian (Charybdis)
e9dca040a6
Added missing routine in commit c19905725fd91e91a7fb42437ff8155921a5b8bd.
2013-07-05 13:56:48 +02:00
Stéphane Adjemian (Charybdis)
e75df484e9
Code factorization.
2013-07-05 13:56:48 +02:00
Stéphane Adjemian (Charybdis)
1657111fa8
Added tags for unitary tests.
2013-07-04 15:00:24 +02:00
Stéphane Adjemian (Charybdis)
45d7568712
Fixed typo.
2013-07-04 14:38:22 +02:00
Stéphane Adjemian (Charybdis)
e69c7a68f4
Changed unitary tests (check also the number of observations).
2013-07-03 16:30:17 +02:00
Stéphane Adjemian (Charybdis)
0d366ea2cf
Added overloaded vertcat method in dynSeries class.
...
*Exemple*
Suppose ts1, ts2, and ts3 are three dynSeries objects with the same variables. Then
ts4 = [ts1; ts2; ts3]
is a dynSeries object with the observations contained in ts1, ts2 and ts3 (in that order).
2013-07-03 16:25:33 +02:00
Stéphane Adjemian (Charybdis)
6db5ba51cb
Added unitary tests.
2013-07-03 15:24:32 +02:00
Stéphane Adjemian (Charybdis)
1fce665e31
Cosmetic change.
2013-07-03 15:16:11 +02:00
Stéphane Adjemian (Charybdis)
0a544809b2
Fixed bug related to broadcasting in dynSeries objects.
2013-07-03 15:16:00 +02:00
Stéphane Adjemian (Charybdis)
55ea513f74
Added broadcasting when assigning new data to a dynSeries object.
...
*Examples*
* ts.A(qq(1950,1):qq(1950,4)) = 1 will put ones for variable A in periods 1950Q1 to 1950Q4
* ts{'A','B'}(qq(1950,1):qq(1950,4)) = 1 will put ones for variables A and B in periods 1950Q1 to 1950Q4
* ts{'A','B'}(qq(1950,1):qq(1950,4)) = ones(4,1) will put ones(4,1) for variables A and B and sub-periods 1950Q1-1950Q4
* ts{'A','B'}(qq(1950,1):qq(1950,4)) = ones(1,2) will put ones(1,2) for variables A and B and each period between 1950Q1 and 1950Q4
2013-07-03 14:54:05 +02:00
Stéphane Adjemian (Charybdis)
84522ce87f
Fixed bug in @dynSeries/subsasgn that pops up when length(S) is equal to two and S(1).type is a dot.
...
Allows Syntax like:
ts.A1(rg) = B
where ts is a dynSeries object, A1 is a variable in the database, rg is a dynDates object and B an array of doubles.
2013-07-03 11:59:52 +02:00
Stéphane Adjemian (Charybdis)
627dda5fc0
Added error message if @dynSeries/dynSeries is called with an empty string.
2013-07-03 10:59:50 +02:00
Stéphane Adjemian (Charybdis)
7459a5dcbb
Changed the behaviour of @dynSeries/save method when the chosen file name corresponds to an existing file in the same folder.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
375d7aae8e
Fixed typo and added unitary test.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
5ededa8848
Rewrote @dynSeries/subsasgn.
...
The following syntaxes are now allowed:
ts{'VARIABLE_NAME'}(range) = data;
where range is a dynDates object and data is an array of doubles, or
ts{'VARIABLE_NAME'}(range) = TS{'OTHER_VARIABLE_NAME'}(range)
where ts and TS are dynSeries objects.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
b5c3ef2ade
Added new unitary test in @dynSeries/subsasgn overloaded method.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
c3da506760
Added provisions for recursive call to @dynSeries/subsasgn overloaded method.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
0fea61a551
Fixed typo (wrong numbering of the last unitary tests).
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
603aeeccb6
Added provisions for date(s) selection.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
e7b22213de
Added comments.
2013-07-01 17:24:22 +02:00
Stéphane Adjemian (Charybdis)
664997eec8
Removed leading wihite spaces in variable names.
2013-06-27 10:38:49 +02:00
Stéphane Adjemian (Charybdis)
0e5819ee38
Duplicated @dynSeries/disp code in @dynSeries/display (so that the name of the dynSeries objected is correctly printed in the command window).
2013-06-26 16:10:56 +02:00
Stéphane Adjemian (Charybdis)
51fc443e39
Fixed bug.
2013-06-24 15:40:39 +02:00
Stéphane Adjemian (Charybdis)
f258ffbfbc
Check the name of the data file in @dynSeries/save method (do not erase the original data file).
2013-06-24 15:40:39 +02:00
Stéphane Adjemian (Charybdis)
28f3ca1d07
Added overloaded disp and display methods for dynSeries objects.
2013-06-24 15:40:39 +02:00
Stéphane Adjemian (Charybdis)
51c4eb6cb3
Fixed bug.
2013-06-24 15:40:39 +02:00
Stéphane Adjemian (Charybdis)
ff48ac617d
Reverted Ferhat's commit 23e583f95c0a5631c943c44f9116f20b91c0fb0a. The names of the dynSeries variables are stored in a column cell array.
2013-06-17 17:52:27 +02:00
Stéphane Adjemian (Charybdis)
479034ae6d
Partially reverted Ferhat's commit 16a73af066fb52cce1ecc98c5e434d7528db2e1f.
2013-06-17 17:52:27 +02:00
Stéphane Adjemian (Charybdis)
480704ff17
Cosmetic change.
2013-06-17 17:52:27 +02:00
Stéphane Adjemian (Charybdis)
7f53a992c0
Cosmetic change.
2013-06-17 17:52:27 +02:00