⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iso_f_smooth.m

📁 用来实现三维阻抗及光学断层成像重建的matlab程序
💻 M
字号:
function [sm1] = iso_f_smooth(simp,w);
%function [sm1] = iso_f_smooth(simp,w);
%
%Calculates a first order discrete Gaussian smoothing operator
%
%
%
%simp = The simplices matrix.
%w    = smoothing weight, w=1...k, default value = 1
%sm1  = The first order smoothing regulariser. 

if nargin<2 
   w=1;
end

if w<0
   error('Weight must be possitive');
end

ndsrch = [simp,(1:size(simp,1))'];

sm1 = spalloc(size(simp,1),size(simp,1),20*size(simp,1));


for i=1:size(ndsrch,1)
   
   t_id = ndsrch(i,1:size(simp,2));
   
   Xsimp = []; %The vector of simp indices that share a node with simp(i)
   
   for j =1:length(t_id)
      
      t_nd = t_id(j);
      
      X1 = find(simp(:,1)==t_nd);
      X2 = find(simp(:,2)==t_nd);
      X3 = find(simp(:,3)==t_nd);
      X4 = find(simp(:,4)==t_nd);
      
      XX = unique([X1;X2;X3;X4]);
      
      Xsimp = [Xsimp;XX];
   end
   
   Xdif = setdiff(Xsimp,i);
   sm1(i,Xdif) = -1/w;
   sm1(i,i) = abs(sum(sm1(i,:)));
   
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -