Changed the type of the variable returned by list_of_parameters_calibrated_as_{Inf,NaN}.
parent
270246acb0
commit
dfcb9df58d
|
@ -574,11 +574,11 @@ if info(1)
|
|||
plist = list_of_parameters_calibrated_as_NaN(M);
|
||||
if ~isempty(plist)
|
||||
message = ['dynare_estimation_init:: Some of the parameters are NaN (' ];
|
||||
for i=1:size(plist,1)
|
||||
if i<size(plist,1)
|
||||
message = [message, deblank(plist(i,:)) ', '];
|
||||
for i=1:length(plist)
|
||||
if i<length(plist)
|
||||
message = [message, plist{i} ', '];
|
||||
else
|
||||
message = [message, deblank(plist(i,:)) ')'];
|
||||
message = [message, plist{i} ')'];
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -586,11 +586,11 @@ if info(1)
|
|||
plist = list_of_parameters_calibrated_as_Inf(M);
|
||||
if ~isempty(plist)
|
||||
message = ['dynare_estimation_init:: Some of the parameters are Inf (' ];
|
||||
for i=1:size(plist,1)
|
||||
if i<size(plist,1)
|
||||
message = [message, deblank(plist(i,:)) ', '];
|
||||
for i=1:length(plist)
|
||||
if i<size(plist)
|
||||
message = [message, plist{i} ', '];
|
||||
else
|
||||
message = [message, deblank(plist(i,:)) ')'];
|
||||
message = [message, plist{i} ')'];
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ function list = list_of_parameters_calibrated_as_Inf(M_)
|
|||
% M_ [structure] Description of the (simulated or estimated) model.
|
||||
%
|
||||
% OUTPUTS
|
||||
% list [char] n*p array of characters, each line is the name of parameter without value.
|
||||
% list [cell] Each element is the name (row char array) of parameter without value.
|
||||
%
|
||||
% ALGORITHM
|
||||
% none
|
||||
|
@ -13,7 +13,7 @@ function list = list_of_parameters_calibrated_as_Inf(M_)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
|
||||
% Copyright (C) 2017 Dynare Team
|
||||
% Copyright (C) 2017-2018 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -29,9 +29,12 @@ function list = list_of_parameters_calibrated_as_Inf(M_)
|
|||
%
|
||||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
idx = find(isinf(M_.params));
|
||||
nnn = length(idx);
|
||||
list = [];
|
||||
|
||||
if nnn
|
||||
list = M_.param_names(idx,:);
|
||||
list = M_.param_names(idx);
|
||||
else
|
||||
list = {};
|
||||
end
|
|
@ -1,11 +1,12 @@
|
|||
function list = list_of_parameters_calibrated_as_NaN(M_)
|
||||
|
||||
% The name of the function is explicit enough...
|
||||
%
|
||||
% INPUTS
|
||||
% M_ [structure] Description of the (simulated or estimated) model.
|
||||
%
|
||||
% OUTPUTS
|
||||
% list [char] n*p array of characters, each line is the name of parameter without value.
|
||||
% list [cell] Each element is the name (row char array) of parameter without value.
|
||||
%
|
||||
% ALGORITHM
|
||||
% none
|
||||
|
@ -13,7 +14,7 @@ function list = list_of_parameters_calibrated_as_NaN(M_)
|
|||
% SPECIAL REQUIREMENTS
|
||||
% none
|
||||
|
||||
% Copyright (C) 2010-2017 Dynare Team
|
||||
% Copyright (C) 2010-2018 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -29,9 +30,12 @@ function list = list_of_parameters_calibrated_as_NaN(M_)
|
|||
%
|
||||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
idx = find(isnan(M_.params));
|
||||
nnn = length(idx);
|
||||
list = [];
|
||||
|
||||
if nnn
|
||||
list = M_.param_names(idx,:);
|
||||
list = M_.param_names(idx);
|
||||
else
|
||||
list = {};
|
||||
end
|
|
@ -33,8 +33,8 @@ plist = list_of_parameters_calibrated_as_NaN(M_);
|
|||
if ~isempty(plist)
|
||||
info=1;
|
||||
message = ['Some of the parameters have no value (' ];
|
||||
for i=1:size(plist,1)
|
||||
if i<size(plist,1)
|
||||
for i=1:length(plist)
|
||||
if i<length(plist)
|
||||
message = [message, plist{i} ', '];
|
||||
else
|
||||
message = [message, plist{i} ')'];
|
||||
|
|
Loading…
Reference in New Issue