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
974e8b1a
Commit
974e8b1a
authored
Mar 27, 2013
by
Stéphane Adjemian
Browse files
Fixed bug.
parent
5132e501
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/@dynSeries/subsasgn.m
View file @
974e8b1a
...
@@ -51,18 +51,31 @@ switch S.type
...
@@ -51,18 +51,31 @@ switch S.type
B
.
name
(
i
)
=
A
.
name
(
id
);
B
.
name
(
i
)
=
A
.
name
(
id
);
B
.
tex
(
i
)
=
A
.
tex
(
id
);
B
.
tex
(
i
)
=
A
.
tex
(
id
);
end
end
A
=
merge
(
A
,
B
);
end
end
end
end
else
A
=
merge
(
A
,
B
);
end
end
case
'.'
case
'.'
A
=
merge
(
A
,
B
);
if
~
isequal
(
S
.
subs
,
B
.
name
)
if
~
isequal
(
S
.
subs
,
B
.
name
{
1
}
)
%
Rename
a
variable
.
id
=
strmatch
(
S
.
subs
,
A
.
name
);
if
isempty
(
id
)
%
Add
a
new
variable
a
change
its
name
.
B
.
name
(
1
)
=
{
S
.
subs
}
;
B
.
tex
(
1
)
=
{
name2tex
(
S
.
subs
)
}
;
else
%
Rename
variable
and
change
its
content
.
B
.
name
(
1
)
=
A
.
name
(
id
);
B
.
tex
(
1
)
=
A
.
tex
(
id
);
end
end
end
otherwise
otherwise
error
(
'
dynSeries
:
:
subsasgn
:
Wrong
syntax
!
'
)
error
(
'
dynSeries
:
:
subsasgn
:
Wrong
syntax
!
'
)
end
end
A
=
merge
(
A
,
B
);
%
@test
:
1
%
@test
:
1
%
$
%
Define
a
datasets
.
%
$
%
Define
a
datasets
.
%
$
A
=
rand
(
10
,
3
);
B
=
rand
(
10
,
1
);
%
$
A
=
rand
(
10
,
3
);
B
=
rand
(
10
,
1
);
...
...
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