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
5e16db57
Commit
5e16db57
authored
Mar 28, 2013
by
Stéphane Adjemian
Browse files
Closes #333
parent
44287a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/@dynSeries/subsasgn.m
View file @
5e16db57
...
...
@@ -34,6 +34,25 @@ switch S.type
if
~
isequal
(
numel
(
S
.
subs
),
numel
(
unique
(
S
.
subs
)))
error
(
'
dynSeries
:
:
subsasgn
:
Wrong
syntax
!
'
)
end
for
i
=
1
:
numel
(
S
.
subs
)
element
=
S
.
subs
{
i
};
idArobase
=
strfind
(
element
,
'@'
);
if
~
isempty
(
idArobase
)
idComma
=
strfind
(
element
(
idArobase
(
1
)
+
1
:
idArobase
(
2
)
-
1
),
','
);
if
numel
(
idArobase
)
==
2
&&
~
isempty
(
idComma
)
elements
=
cell
(
1
,
numel
(
idComma
)
+
1
);
j
=
1
;
expression
=
element
(
idArobase
(
1
)
+
1
:
idArobase
(
2
)
-
1
);
while
~
isempty
(
expression
)
[
token
,
expression
]
=
strtok
(
expression
,
','
);
elements
(
j
)
=
{[
element
(
1
:
idArobase
(
1
)
-
1
),
token
,
element
(
idArobase
(
2
)
+
1
:
end
)]};
j
=
j
+
1
;
end
S
.
subs
=
replace_object_in_a_one_dimensional_cell_array
(
S
.
subs
,
elements
(
:
),
i
);
else
error
(
'
dynSeries
::
subsasgn
:
Wrong
syntax
!
'
)
end
end
end
if
~
isequal
(
length
(
S
.
subs
),
B
.
vobs
)
error
(
'
dynSeries
::
subsasgn
:
Wrong
syntax
!
'
)
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