Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dseries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
dseries
Commits
50b0568a
Verified
Commit
50b0568a
authored
1 year ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
@dseries/hptrend_, @dseries/mpower: remove duplicate branches in if/then/else statement
Detected by MATLAB Code Analyzer app.
parent
c8901abc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/@dseries/hptrend_.m
+3
-11
3 additions, 11 deletions
src/@dseries/hptrend_.m
src/@dseries/mpower.m
+1
-5
1 addition, 5 deletions
src/@dseries/mpower.m
with
4 additions
and
16 deletions
src/@dseries/hptrend_.m
+
3
−
11
View file @
50b0568a
...
...
@@ -37,18 +37,10 @@ end
o
.
data
=
sample_hp_filter
(
o
.
data
,
lambda
);
for
i
=
1
:
vobs
(
o
)
if
isempty
(
o
.
ops
{
i
})
if
isempty
(
lambda
)
o
.
ops
(
i
)
=
{
sprintf
(
'hptrend(%s, [])'
,
o
.
name
{
i
})};
else
o
.
ops
(
i
)
=
{
sprintf
(
'hptrend(%s, %s)'
,
o
.
name
{
i
},
num2str
(
lambda
))};
end
if
isempty
(
lambda
)
o
.
ops
(
i
)
=
{
sprintf
(
'hptrend(%s, [])'
,
o
.
name
{
i
})};
else
if
isempty
(
lambda
)
o
.
ops
(
i
)
=
{
sprintf
(
'hptrend(%s, [])'
,
o
.
name
{
i
})};
else
o
.
ops
(
i
)
=
{
sprintf
(
'hptrend(%s, %s)'
,
o
.
name
{
i
},
num2str
(
lambda
))};
end
o
.
ops
(
i
)
=
{
sprintf
(
'hptrend(%s, %s)'
,
o
.
name
{
i
},
num2str
(
lambda
))};
end
end
...
...
This diff is collapsed.
Click to expand it.
src/@dseries/mpower.m
+
1
−
5
View file @
50b0568a
...
...
@@ -39,11 +39,7 @@ if isnumeric(p) && isvector(p) && isdseries(o) && length(p)==nobs(o)
q
=
copy
(
o
);
q
.
data
=
bsxfun
(
@
power
,
o
.
data
,
p
);
for
i
=
1
:
vobs
(
q
)
if
isempty
(
q
.
ops
{
i
})
q
.
ops
(
i
)
=
{
sprintf
(
'power(%s, %s)'
,
q
.
name
{
i
},
matrix2string
(
p
))};
else
q
.
ops
(
i
)
=
{
sprintf
(
'power(%s, %s)'
,
q
.
name
{
i
},
matrix2string
(
p
))};
end
q
.
ops
(
i
)
=
{
sprintf
(
'power(%s, %s)'
,
q
.
name
{
i
},
matrix2string
(
p
))};
end
return
end
...
...
This diff is collapsed.
Click to expand it.
Stéphane Adjemian
@stepan-a
mentioned in commit
a2c7888d
·
1 year ago
mentioned in commit
a2c7888d
mentioned in commit a2c7888db8c9493353522b7301df6820dadfd555
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment