eidors_model_params

PURPOSE ^

mdl = eidors_model_params( mdl );

SYNOPSIS ^

function mdl = eidors_model_params( mdl );

DESCRIPTION ^

 mdl = eidors_model_params( mdl );
 Fill in default parameter values in EIDORS types

 (C) 2006 Andy Adler. Licensed under the GPL v2
 $Id: eidors_model_params.m 3437 2012-07-02 22:21:43Z bgrychtol $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mdl = eidors_model_params( mdl );
0002 % mdl = eidors_model_params( mdl );
0003 % Fill in default parameter values in EIDORS types
0004 %
0005 % (C) 2006 Andy Adler. Licensed under the GPL v2
0006 % $Id: eidors_model_params.m 3437 2012-07-02 22:21:43Z bgrychtol $
0007 
0008 % TODO - to caching
0009 
0010 warning('EIDORS:deprecated','EIDORS_MODEL_PARAMS is deprecated as of 02-Jul-2012. ');
0011 
0012 try
0013    type=mdl.type;
0014 catch
0015    error('eidors_model_params: object is not eidors object (no type)');
0016 end
0017 
0018 switch type;
0019    case 'inv_model';
0020       mdl.fwd_model= eidors_model_params( mdl.fwd_model );
0021       if ~isfield(mdl,'reconst_type');
0022          mdl.reconst_type= 'difference';
0023       end
0024 
0025    case 'fwd_model';
0026       mdl = mdl_normalize(mdl,mdl_normalize(mdl));
0027 %       if ~isfield(mdl,'normalize_measurements');
0028 %          mdl.normalize_measurements= 0;
0029 %       end
0030       if ~isfield(mdl,'elems');
0031          return;
0032       end
0033       
0034       mdl.elems=    double(mdl.elems);
0035       if isfield(mdl,'boundary')
0036          mdl.boundary= double(mdl.boundary);
0037       else
0038          mdl.boundary= find_boundary(mdl.elems);
0039       end
0040 
0041       % fill in boundary if it doesn't exist
0042       mdl.n_elem = size(mdl.elems,1);
0043       mdl.n_node = size(mdl.nodes,1);
0044       if isfield(mdl,'electrode');
0045          mdl.n_elec = length(mdl.electrode);
0046       else
0047          mdl.n_elec = 0;
0048       end
0049 end

Generated on Wed 21-Jun-2017 09:29:07 by m2html © 2005