?? iso_s_smooth.sci
字號:
function [sm2]=iso_s_smooth(%simp,w)sm2=[];[nargout,nargin] = argn(0)//function [sm2] = iso_f_smooth(simp,w);// //Calculates a second order discrete Gaussian smoothing operator// // // //simp = The simplices matrix.//w = smoothing weight, w=1...k, default value = 1//sm2 = The second 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 usedsm2 = spalloc(size(%simp,1),size(%simp,1),80*size(%simp,1)); for i = 1:size(ndsrch,1) t_id = ndsrch(i,1:size(%simp,2)); X2simp = []; Xsimp = []; //! 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(:,3)==t_nd)'; //!! Unknown function unique ,the original calling sequence is used XX = unique([X1;X2;X3;X4]); Xsimp = [Xsimp;XX]; end Joined = %simp(Xsimp,:); //!! Unknown function unique ,the original calling sequence is used Jr = unique(Joined); //! unknown arg type, using mtlb_length for k = 1:mtlb_length(Jr) t_2nd = Jr(k); XX1 = find(%simp(:,1)==t_2nd)'; XX2 = find(%simp(:,2)==t_2nd)'; XX3 = find(%simp(:,3)==t_2nd)'; XX4 = find(%simp(:,4)==t_2nd)'; //!! Unknown function unique ,the original calling sequence is used XXX = unique([XX1;XX2;XX3;XX4]); X2simp = [X2simp;XXX]; end //!! Unknown function setdiff ,the original calling sequence is used Xdif = setdiff(Xsimp,i); //!! Unknown function setdiff ,the original calling sequence is used Xdif2 = setdiff(X2simp,i); sm2(i,Xdif) = -0.5*w; sm2(i,Xdif2) = -1/w; //! mtlb_sum(sm2(i,:)) may be replaced by //! sum(sm2(i,:)) if sm2(i,:)is a vector //! sum(sm2(i,:),1) if sm2(i,:)is a matrix sm2(i,i) = abs(mtlb_sum(sm2(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 + -