rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
get_bound_to_optimize.m
1 function [lower_bound, upper_bound]=get_bound_to_optimize(model)
2 %function [lower_bound, upper_bound]=get_bound_to_optimize(model)
3 %
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
6 %
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
11 %
12 %Output
13 % lower_bound: vector including all the lower bounds of the paramteres from the model, that should be
14 % optimized
15 % upper_bound: vector including all the upper bounds of the paramteres from the model, that should be
16 % optimized
17 %
18 % Oliver Zeeb 21.06.2010
19 
20 
21 lower_bound=[];
22 upper_bound=[];
23 
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;
27 else
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)];
32  end
33  end
34 end
function [ opt_data , model ] = optimize(model, model_data, detailed_data, reduced_data)
opt_data = optimize(model, model_data, detailed_data, reduced_data)
Definition: optimize.m:17