CALC_SYSTEM_MAT: calculate FEM system matrix from fwd_model and image system_mat= calc_system_mat( fwd_model, image) OR system_mat= calc_system_mat( image) it will call the fwd_model.system_mat if fwd_model.system_mat is a matrix, calc_system_mat will return this matrix system_mat system_mat.E is FEM system_matrix system_mat.perm is permutation of E i.e. E(perm,perm) fwd_model is a fwd_model structure image is an image structure
0001 function system_mat = calc_system_mat( fwd_model, img) 0002 % CALC_SYSTEM_MAT: calculate FEM system matrix from fwd_model and image 0003 % 0004 % system_mat= calc_system_mat( fwd_model, image) 0005 % OR 0006 % system_mat= calc_system_mat( image) 0007 % 0008 % it will call the fwd_model.system_mat 0009 % 0010 % if fwd_model.system_mat is a matrix, calc_system_mat will return this 0011 % matrix 0012 % 0013 % system_mat 0014 % system_mat.E is FEM system_matrix 0015 % system_mat.perm is permutation of E i.e. E(perm,perm) 0016 % fwd_model is a fwd_model structure 0017 % image is an image structure 0018 0019 % (C) 2005 Andy Adler. License: GPL version 2 or version 3 0020 % $Id: calc_system_mat.m 5980 2019-06-23 07:34:48Z aadler $ 0021 %system_mat= feval(fwd_model.system_mat, fwd_model, img);return 0022 0023 if nargin == 1 0024 img= fwd_model; 0025 else 0026 warning('EIDORS:DeprecatedInterface', ... 0027 ['Calling CALC_SYSTEM_MAT with two arguments is deprecated and will cause' ... 0028 ' an error in a future version. First argument ignored.']); 0029 img.fwd_model = fwd_model; 0030 end 0031 warning off EIDORS:DeprecatedInterface 0032 fwd_model= img.fwd_model; 0033 0034 if isnumeric(fwd_model.system_mat) 0035 system_mat = fwd_model.system_mat; 0036 0037 else 0038 0039 copt.cache_obj= {fwd_model, img.elem_data}; 0040 copt.fstr = 'system_mat'; 0041 0042 try % in case it's a string 0043 fwd_model.system_mat = str2func(fwd_model.system_mat); 0044 end 0045 0046 system_mat = eidors_cache(fwd_model.system_mat,img,copt); 0047 0048 end 0049 0050 warning on EIDORS:DeprecatedInterface