MEAS_ICOV_RM_ELECS: remove electrodes from consideration meas_icov = meas_icov_rm_elecs( inv_model, elec_list ) elec_list = numbers of elecs to remove or as imdl.meas_icov_rm_elecs.elec_list Reference Accounting for erroneous electrode data in EIT A. Adler Physiological Measurement, 25(1):227-238, 2004.
0001 function meas_icov = meas_icov_rm_elecs( imdl, elec_list ) 0002 % MEAS_ICOV_RM_ELECS: remove electrodes from consideration 0003 % meas_icov = meas_icov_rm_elecs( inv_model, elec_list ) 0004 % 0005 % elec_list = numbers of elecs to remove 0006 % or as imdl.meas_icov_rm_elecs.elec_list 0007 % 0008 % Reference Accounting for erroneous electrode data in EIT 0009 % A. Adler Physiological Measurement, 25(1):227-238, 2004. 0010 0011 % (C) 2008 Andy Adler. License: GPL version 2 or version 3 0012 % $Id: meas_icov_rm_elecs.html 2819 2011-09-07 16:43:11Z aadler $ 0013 0014 if nargin< 2 0015 elec_list = imdl.meas_icov_rm_elecs.elec_list; 0016 end 0017 0018 meas_icov = []; 0019 for stim = imdl.fwd_model.stimulation(:)' 0020 mp = stim.meas_pattern; 0021 sp = stim.stim_pattern; 0022 icovi = ones(size(mp,1),1); 0023 if any(sp(elec_list) ~= 0) 0024 icovi = 0*icovi; 0025 else 0026 icovi = ~any( mp(:,elec_list) ~= 0, 2); 0027 end 0028 0029 meas_icov = [meas_icov; icovi]; 0030 end 0031 0032 n = length(meas_icov); 0033 meas_icov = spdiags( meas_icov, 0, n,n );