From 4fb3dc035fec1df378224c8d7913a91883655d29 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
<stephane.adjemian@univ-lemans.fr>
Date: Mon, 2 Dec 2013 10:13:57 +0100
Subject: [PATCH] Cosmetic changes in section "dates class".
---
doc/dynare.texi | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/doc/dynare.texi b/doc/dynare.texi
index b2998d7433..8c698bf585 100644
--- a/doc/dynare.texi
+++ b/doc/dynare.texi
@@ -8558,7 +8558,9 @@ for monthly dates and 1-52 for weekly dates) are stored in the second
column.
@end table
+
@noindent Each member is private, one can display the content of a member but cannot change its value:
+
@example
>> d = dates('2009Q2');
>> d.time
@@ -8578,13 +8580,17 @@ ans =
@deftypefnx {dates} dates (@code{FREQ})
Returns an empty @dates object with a given frequency (if the constructor is called with one input argument). @code{FREQ} is a character equal to 'Y' or 'A' for annual dates, 'Q' for quaterly dates, 'M' for monthly dates or 'W' for weekly dates. Note that @code{FREQ} is not case sensitive, so that, for instance, 'q' is also allowed for quaterly dates. The frequency can also be set with an integer scalar equal to 1 (annual), 4 (quaterly), 12 (monthly) or 52 (weekly). The instantiation of empty objects can be used to rename the @dates class. For instance, if one only works with quaterly dates, he can create @code{qq} as:
+
@example
qq = dates('Q')
@end example
-and a @dates object holding the date @code{2009Q2}:
+
+@noindent and a @dates object holding the date @code{2009Q2}:
+
@example
d0 = dates(2009,2);
@end example
+
@noindent which is much simpler if @dates objects have to be defined programatically.
@end deftypefn
@@ -8598,7 +8604,6 @@ Returns a @dates object that represents a date as given by the string @code{STRI
@end deftypefn
-
@sp 1
@deftypefn {dates} dates (@code{DATES})
@@ -8628,15 +8633,19 @@ do4 = dates('Q',1950, 1);
@sp 1
-A list of the available methods, by alphabetical order, is given below. Note that the Matlab/Octave classes do not allow in place modifications: when a method is applied to an object a new object is instantiated. For instance, to apply the method @code{multiplybytwo} to an object @code{X} we write:
+@noindent A list of the available methods, by alphabetical order, is given below. Note that the Matlab/Octave classes do not allow in place modifications: when a method is applied to an object a new object is instantiated. For instance, to apply the method @code{multiplybytwo} to an object @code{X} we write:
+
@example
Y = X.multiplybytwo()
@end example
-or equivalently:
+
+@noindent or equivalently:
+
@example
Y = multiplybytwo(X)
@end example
-the object @code{X} is left unchanged, and the object @code{Y} is a modified copy of @code{X}.
+
+@noindent the object @code{X} is left unchanged, and the object @code{Y} is a modified copy of @code{X}.
@sp 1
--
GitLab