📄 iso_f_smooth.sci
字号:
function [sm1]=iso_f_smooth(%simp,w)sm1=[];[nargout,nargin] = argn(0)//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 then w = 1;end if w<0 then error('Weight must be possitive');end ndsrch = [%simp,(1:size(%simp,1))']; //!! Unknown function spalloc ,the original calling sequence is usedsm1 = 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) //! unknown arg type, using mtlb_length for j = 1:mtlb_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)'; //!! Unknown function unique ,the original calling sequence is used XX = unique([X1;X2;X3;X4]); Xsimp = [Xsimp;XX]; end //!! Unknown function setdiff ,the original calling sequence is used Xdif = setdiff(Xsimp,i); sm1(i,Xdif) = -1/w; //! mtlb_sum(sm1(i,:)) may be replaced by //! sum(sm1(i,:)) if sm1(i,:)is a vector //! sum(sm1(i,:),1) if sm1(i,:)is a matrix sm1(i,i) = abs(mtlb_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 + -