0001 function mdl = eidors_model_params( mdl );
0002
0003
0004
0005
0006
0007
0008
0009
0010 try
0011 type=mdl.type;
0012 catch
0013 error('eidors_model_params: object is not eidors object (no type)');
0014 end
0015
0016 switch type;
0017 case 'inv_model';
0018 mdl.fwd_model= eidors_model_params( mdl.fwd_model );
0019 if ~isfield(mdl,'reconst_type');
0020 mdl.reconst_type= 'difference';
0021 end
0022
0023 case 'fwd_model';
0024 if ~isfield(mdl,'normalize_measurements');
0025 mdl.normalize_measurements= 0;
0026 end
0027 if ~isfield(mdl,'elems');
0028 return;
0029 end
0030
0031 mdl.elems= double(mdl.elems);
0032 if isfield(mdl,'boundary')
0033 mdl.boundary= double(mdl.boundary);
0034 else
0035 mdl.boundary= find_boundary(mdl.elems);
0036 end
0037
0038
0039 mdl.n_elem = size(mdl.elems,1);
0040 mdl.n_node = size(mdl.nodes,1);
0041 if isfield(mdl,'electrode');
0042 mdl.n_elec = length(mdl.electrode);
0043 else
0044 mdl.n_elec = 0;
0045 end
0046 end