Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
fac73192
Commit
fac73192
authored
Feb 07, 2013
by
Sébastien Villemot
Browse files
@dynDate.display(): simplify the code by reusing format()
parent
4b50acbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/@dynDate/display.m
View file @
fac73192
...
@@ -17,20 +17,5 @@ function display(d)
...
@@ -17,20 +17,5 @@ function display(d)
% You should have received a copy of the GNU General Public License
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
fprintf
(
'%s = <dynDate: %d'
,
inputname
(
1
),
d
.
time
(
1
));
fprintf
(
'%s = <dynDate: %s>\n'
,
inputname
(
1
),
format
(
d
));
switch
d
.
freq
case
1
case
4
fprintf
(
'Q'
)
case
12
fprintf
(
'M'
)
case
52
fprintf
(
'W'
)
otherwise
error
(
'Unknown frequency %d'
,
d
.
freq
)
end
if
d
.
freq
~=
1
fprintf
(
'%d'
,
d
.
time
(
2
))
end
fprintf
(
'>\n'
)
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment