Floating point relational operator.
This function provides comparison operation improvement for floating point numbers.
Singleton expansion, multidimensional arrays supported.
example:
>> A = [ 1, 1, 1, 100, 1, 4];
>> B = [ 1, 1.2, 1.01, 101, 4, 1];
>> A<B
ans = 0 1 1 1 1 0
>> numcmp(A,B,1,1,@lt)
ans = 0 1 0 0 1 0
Zitieren als
Jan Orwat (2024). Floating point relational operator. (https://www.mathworks.com/matlabcentral/fileexchange/57457-floating-point-relational-operator), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Quellenangaben
Inspiriert von: numcmp.m
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.2.0.0 | . |
||
1.1.0.0 | inf/nan errors solved. Please note that with numcmp infinities are not equal. inf == inf returns 1, while numcmp(inf,inf) returns 0. This is actually closer to reality:)
|
||
1.0.0.0 | Note, this function uses only absolute precision. |