solution_ext.m

来自「用来实现三维阻抗及光学断层成像重建的matlab程序」· M 代码 · 共 41 行

M
41
字号
function [CC] = solution_ext(BB,vtx,simp);
%function [CC] = solution_ext(BB,vtx,simp);
%
%Auxiliary function that extracts a secondary NODE-wise solution CC 
%based on the calculated ELEMENT-wise solution BB. This function is 
%called from slicer_plot function.
%
%
%
%BB   = The calculated (element-wise) inverse solution 
%vtx  = The vertices matrix
%simp = The simplices matrix
 
%Initialise the destination matrix CC
CC = zeros(size(vtx,1),1);

for uu=1:length(BB)
   
   sim_val = BB(uu); % Solution value for simplex number uu
   
   % We aim to distribute this solution value to the nodes involved in the current simplex.
   
   sim_nodes = simp(uu,:);
   
   for oo=1:length(sim_nodes)
      
      s_nd = sim_nodes(oo); % Each of the simplex's nodes 
      
      CC(s_nd) = CC(s_nd) + sim_val;
   end
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is part of the EIDORS suite.
% Copyright (c) N. Polydorides 2001
% Copying permitted under terms of GNU GPL
% See enclosed file gpl.html for details.
% EIDORS 3D version 1.0
% MATLAB version 5.3 R11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?