Vectorized Safe Reciprocal

版本 1.0.0.0 (4.3 KB) 作者: Marc Compere
Accepts an input array and returns reciprocals of individual elements without divide-by-zero errors.
1.5K 次下载
更新时间 2002/9/5

无许可证

This block accepts an array of inputs and, depending on the individual elements, will return an array of reciprocals of the input.

If an input element is zero, the corresponding output element is assigned a very large number equal to 1/epsilon_machine on most 32-bit computers (epsilon_machine ~= 2.22044604925031e-016)

If the numebr is not zero, it returns the reciprocal of that number in the appropriate output element.

This function will give you the reciprocal of an array without producing divide-by-zero errors.

引用格式

Marc Compere (2024). Vectorized Safe Reciprocal (https://www.mathworks.com/matlabcentral/fileexchange/2330-vectorized-safe-reciprocal), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Biomedical Imaging 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0