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
1ff6b2de
Commit
1ff6b2de
authored
Oct 02, 2013
by
Stéphane Adjemian
Browse files
Fixed bug caused by the size of the vector of parameters (transposition needed).
parent
ab7f0dde
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/simpsa.m
View file @
1ff6b2de
...
...
@@ -235,7 +235,7 @@ while 1,
% if output function given then run output function to plot intermediate result
if
~
isempty
(
OPTIONS
.
OUTPUT_FCN
),
feval
(
OPTIONS
.
OUTPUT_FCN
,
P
(
1
,:),
Y
(
1
));
feval
(
OPTIONS
.
OUTPUT_FCN
,
transpose
(
P
(
1
,:)
)
,
Y
(
1
));
end
% remaining vertices of simplex
...
...
@@ -321,7 +321,7 @@ while 1,
% if output function given then run output function to plot intermediate result
if
~
isempty
(
OPTIONS
.
OUTPUT_FCN
),
feval
(
OPTIONS
.
OUTPUT_FCN
,
P
(
1
,:),
Y
(
1
));
feval
(
OPTIONS
.
OUTPUT_FCN
,
transpose
(
P
(
1
,:)
)
,
Y
(
1
));
end
% end the optimization if one of the stopping criteria is met
...
...
@@ -449,7 +449,7 @@ while 1,
end
% return solution
X
=
PBEST
;
X
=
transpose
(
PBEST
)
;
FVAL
=
YBEST
;
% store number of function evaluations
...
...
@@ -516,7 +516,7 @@ for i = 1:NDIM,
end
% calculate cost associated with PTRY
YTRY
=
feval
(
FUN
,
PTRY
,
varargin
{:});
YTRY
=
feval
(
FUN
,
PTRY
(:)
,
varargin
{:});
% add one to number of function evaluations
nFUN_EVALS
=
nFUN_EVALS
+
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