Vectorized Safe Reciprocal

Accepts an input array and returns reciprocals of individual elements without divide-by-zero errors.
1,5K Downloads
Aktualisiert 5. Sep 2002

Keine Lizenz

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.

Zitieren als

Marc Compere (2025). Vectorized Safe Reciprocal (https://www.mathworks.com/matlabcentral/fileexchange/2330-vectorized-safe-reciprocal), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R13
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Biomedical Imaging finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0