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
40fc16e6
Commit
40fc16e6
authored
Jun 06, 2012
by
Sébastien Villemot
Browse files
Remove MATLAB short-circuit operators
parent
425aabbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/non_linear_dsge_likelihood.m
View file @
40fc16e6
...
...
@@ -151,7 +151,7 @@ nvobs = DynareDataset.info.nvobs;
%------------------------------------------------------------------------------
%
Return
,
with
endogenous
penalty
,
if
some
parameters
are
smaller
than
the
lower
bound
of
the
prior
domain
.
if
(
DynareOptions
.
mode_compute
~=
1
)
&
any
(
xparam1
<
BayesInfo
.
lb
)
if
(
DynareOptions
.
mode_compute
~=
1
)
&
&
any
(
xparam1
<
BayesInfo
.
lb
)
k
=
find
(
xparam1
<
BayesInfo
.
lb
);
fval
=
penalty
+
sum
((
BayesInfo
.
lb
(
k
)
-
xparam1
(
k
)).
^
2
);
exit_flag
=
0
;
...
...
@@ -160,7 +160,7 @@ if (DynareOptions.mode_compute~=1) & any(xparam1<BayesInfo.lb)
end
%
Return
,
with
endogenous
penalty
,
if
some
parameters
are
greater
than
the
upper
bound
of
the
prior
domain
.
if
(
DynareOptions
.
mode_compute
~=
1
)
&
any
(
xparam1
>
BayesInfo
.
ub
)
if
(
DynareOptions
.
mode_compute
~=
1
)
&
&
any
(
xparam1
>
BayesInfo
.
ub
)
k
=
find
(
xparam1
>
BayesInfo
.
ub
);
fval
=
penalty
+
sum
((
xparam1
(
k
)
-
BayesInfo
.
ub
(
k
)).
^
2
);
exit_flag
=
0
;
...
...
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