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
Johannes Pfeifer
dynare
Commits
7dfbb903
Commit
7dfbb903
authored
Sep 03, 2013
by
Stéphane Adjemian
Browse files
Check that size and save methods (dynSeries) come in last position.
parent
15df9972
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/@dynSeries/subsref.m
View file @
7dfbb903
...
...
@@ -90,19 +90,36 @@ switch S(1).type
end
case
{'
save
'}
%
Save
dynSeries
object
on
disk
(
default
is
a
csv
file
).
B
=
NaN
;
if
length
(
S
)
==
2
&&
strcmp
(
S
(
2
).
type
,
'
()
'
)
save
(
A
,
S
(
2
).
subs
{
:
}
);
S
=
shiftS
(
S
);
else
if
isequal
(
length
(
S
),
2
)
if
strcmp
(
S
(
2
).
type
,
'
()
'
)
if
isempty
(
S
(
2
).
subs
)
save
(
A
,
inputname
(
1
));
else
save
(
A
,
S
(
2
).
subs
{
:
}
);
end
S
=
shiftS
(
S
);
else
error
(
'
dynSeries
::
subsref
:
Wrong
syntax
.
'
)
end
elseif
isequal
(
length
(
S
),
1
)
save
(
A
,
inputname
(
1
));
else
error
(
'
dynSeries
::
subsref
:
Call
to
save
method
must
come
in
last
position
!
'
)
end
case
{'
size
'}
if
length
(
S
)
==
2
&&
strcmp
(
S
(
2
).
type
,
'
()
'
)
&&
~
isempty
(
S
(
2
).
subs
)
B
=
size
(
A
,
S
(
2
).
subs
{
1
}
);
if
isequal
(
length
(
S
),
2
)
&&
strcmp
(
S
(
2
).
type
,
'
()
'
)
if
isempty
(
S
(
2
).
subs
)
[
x
,
y
]
=
size
(
A
);
B
=
[
x
,
y
];
else
B
=
size
(
A
,
S
(
2
).
subs
{
1
});
end
S
=
shiftS
(
S
);
else
else
if
isequal
(
length
(
S
),
1
)
[
x
,
y
]
=
size
(
A
);
B
=
[
x
,
y
];
else
error
(
'
dynSeries
::
subsref
:
Call
to
size
method
must
come
in
last
position
!
'
)
end
case
{'
rename
','
tex_rename
'}
B
=
feval
(
S
(
1
).
subs
,
A
,
S
(
2
).
subs
{
:
}
);
...
...
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