calc_system_mat

PURPOSE ^

CALC_SYSTEM_MAT: calculate FEM system matrix from fwd_model and image

SYNOPSIS ^

function system_mat = calc_system_mat( fwd_model, img)

DESCRIPTION ^

 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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 4832 2015-03-29 21:13:53Z bgrychtol-ipa $
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 end
0030 warning off EIDORS:DeprecatedInterface
0031 fwd_model= img.fwd_model;
0032 
0033 if isnumeric(fwd_model.system_mat)
0034    system_mat = fwd_model.system_mat;
0035 
0036 else
0037    
0038    copt.cache_obj= {fwd_model, img.elem_data};
0039    copt.fstr = 'system_mat';
0040    
0041    try % in case it's a string
0042        fwd_model.system_mat = str2func(fwd_model.system_mat); 
0043    end
0044    
0045    system_mat = eidors_cache(fwd_model.system_mat,{fwd_model,img},copt);
0046    
0047 end
0048 
0049 warning on EIDORS:DeprecatedInterface

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