numcmp.m

Compares between numerical arrays up to a certain precision.
2K Downloads
Aktualisiert 4 Mai 2016

Lizenz anzeigen

Anmerkung des Herausgebers: This file was selected as MATLAB Central Pick of the Week

This program compares numerical arrays up to a certain precision.
Examples:
>> numcmp(x); % compares x==0.1
>> numcmp(x,'<=',y,3); % compares x<=y up to 0.001

See the screenshot for another example.

This is usefull to compare serial dates up to 0.1 seconds by using:
>> numcmp(time1*86400,FUN,time2*86400)
and avoiding floating point problems with the serial dates in days.

Zitieren als

Carlos Adrian Vargas Aguilera (2024). numcmp.m (https://www.mathworks.com/matlabcentral/fileexchange/21190-numcmp-m), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2007b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert: Floating point relational operator.

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

BSD License
Fixed bug with Infs inputs