1 function [lower_bound, upper_bound]=get_bound_to_optimize(model)
2 %
function [lower_bound, upper_bound]=get_bound_to_optimize(model)
4 %Function that gives two vectors upper_bound and lower_bound with the boundaries of the parameters to
optimize
5 %i.e. all the bpundaries of the parameters with a
"1" in model.optimization.params_to_optimize
7 %Required fields of model:
8 % model.mu_ranges: field with the ranges of the parameters
9 % model.optimization.params_to_optimize: vector with 0
if the parameter
10 % should not be optimized and 1
if the parameter should optimized
13 % lower_bound: vector including all the lower bounds of the paramteres from the model, that should be
15 % upper_bound: vector including all the upper bounds of the paramteres from the model, that should be
18 % Oliver Zeeb 21.06.2010
24 if isfield(model.optimization,
'lower_bound')&&isfield(model.optimization,
'upper_bound')
25 lower_bound = model.optimization.lower_bound;
26 upper_bound = model.optimization.upper_bound;
28 for k=1:length(model.mu_ranges)
29 if model.optimization.params_to_optimize(k) == 1
30 lower_bound = [lower_bound, model.mu_ranges{k}(1)];
31 upper_bound = [upper_bound, model.mu_ranges{k}(2)];
function [ opt_data , model ] = optimize(model, model_data, detailed_data, reduced_data)
opt_data = optimize(model, model_data, detailed_data, reduced_data)