div.m
来自「image denoising toolbox in matlab」· M 代码 · 共 36 行
M
36 行
function fd = div(Px,Py, options)% div - divergence (backward difference)%% fd = div(Px,Py, options);% fd = div(P, options);%% options.bound = 'per' or 'sym'%% Copyright (c) 2007 Gabriel Peyreif size(Px,3)>1 if nargin>1 options = Py; clear Py; end Py = Px(:,:,2); Px = Px(:,:,1);endoptions.null = 0;if isfield(options, 'bound') bound = options.bound;else bound = 'sym';endif strcmp(bound, 'sym') fx = Px-Px([1 1:end-1],:); fy = Py-Py(:,[1 1:end-1]); fd = fx+fy;else fx = Px-Px([end 1:end-1],:); fy = Py-Py(:,[end 1:end-1]); fd = fx+fy;end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?