safedivide.m
来自「显著区域检测。求的图像中感兴趣区域的位置」· M 代码 · 共 18 行
M
18 行
% safeDivide - divides two arrays, checking for 0/0.%% result = safeDivide(arg1,arg2)% returns arg1./arg2, where 0/0 is assumed to be 0 instead of NaN.% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007% by Dirk B. Walther and the California Institute of Technology.% See the enclosed LICENSE.TXT document for the license agreement. % More information about this project is available at: % http://www.saliencytoolbox.netfunction result = safeDivide(arg1,arg2)ze = (arg2 == 0);arg2(ze) = 1;result = arg1./arg2;result(ze) = 0;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?