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
Sébastien Villemot
dseries
Commits
bb2064b6
Commit
bb2064b6
authored
Oct 17, 2016
by
Houtan Bastani
Browse files
`inputname` no longer works in `subsref`. Default name for saving dseries is now `dynare_series`
parent
3752dbc7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/@dseries/save.m
View file @
bb2064b6
...
...
@@ -2,7 +2,7 @@ function save(A,basename,format) % --*-- Unitary tests --*--
% Saves a dseries object on disk.
% Copyright (C) 2013 Dynare Team
% Copyright (C) 2013
-2016
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -24,7 +24,7 @@ if nargin<3 || isempty(format)
end
if
nargin
<
2
||
isempty
(
basename
)
basename
=
inputname
(
1
)
;
basename
=
'dynare_series'
;
end
switch
format
...
...
@@ -163,20 +163,16 @@ end
%$ % Define names
%$ A_name = {'A1';'A2'};
%$
%$ % Instantiate a time series object.
%$ % Instantiate
and save
a time series object.
%$ try
%$ ts1 = dseries(A,[],A_name,[]);
%$ if isoctave
%$ ts1.save('A');
%$ else
%$ ts1.save;
%$ end
%$ ts1.save;
%$ t = 1;
%$ catch
%$ t = 0;
%$ end
%$
%$ delete('
ts1
.csv');
%$ delete('
dynare_series
.csv');
%$
%$ T = all(t);
%@eof:4
src/@dseries/subsref.m
View file @
bb2064b6
...
...
@@ -150,7 +150,7 @@ switch S(1).type
error
(
'
dseries
::
subsref
:
Wrong
syntax
.
'
)
end
elseif
isequal
(
length
(
S
),
1
)
save
(
A
,
inputname
(
1
)
);
save
(
A
);
else
error
(
'
dseries
::
subsref
:
Call
to
save
method
must
come
in
last
position
!
'
)
end
...
...
@@ -587,17 +587,13 @@ end
%
$
%
Instantiate
a
time
series
object
.
%
$
try
%
$
ts1
=
dseries
(
A
,[],
A_name
,[]);
%
$
if
isoctave
%
$
ts1
.
save
(
'
ts1
'
);
%
$
else
%
$
ts1
.
save
();
%
$
end
%
$
ts1
.
save
();
%
$
t
=
1
;
%
$
catch
%
$
t
=
0
;
%
$
end
%
$
%
$
delete
(
'
ts1
.
csv
'
)
%
$
delete
(
'
dynare_series
.
csv
'
)
%
$
%
$
T
=
all
(
t
);
%
@eof
:
12
...
...
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