ErrorFunc
PURPOSE 
SYNOPSIS 
function no=ErrorFunc(rho,Uel,Agrad,Kb,M,S,R,alpha,NNode2,NElement2,C,T,MeasPatt,p,r,L,Ind2);
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
- ForwardSolution ForwardSolution Solves the potential distribution in 2D EIT
- RemoveVolt RemoveVolt Removes all the voltages measured on the current carrying electrodes
- UpdateFemMatrix UpdateFemMatrix Assembles the system matrix for EIT
This function is called by:
SOURCE CODE 
0001 function no=ErrorFunc(rho,Uel,Agrad,Kb,M,S,R,alpha,NNode2,NElement2,C,T,MeasPatt,p,r,L,Ind2);
0002
0003 A=UpdateFemMatrix(Agrad,Kb,M,S,Ind2*rho);
0004 Uref=ForwardSolution(NNode2,NElement2,A,C,T,MeasPatt,'real',p,r);
0005 Urefel=Uref.Electrode(:);
0006 Urefel=RemoveVolt(Urefel,L);
0007 no=norm((Uel(:)-Urefel(:)))^2+alpha*norm(R*rho)^2;
0008
Generated on Tue 09-Aug-2011 11:38:31 by m2html © 2005