📄 safedivide.m
字号:
% 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -