No BSD License  

Highlights from
numcmp.m

Be the first to rate this file! 1 Download (last 30 days) File Size: 3.71 KB File ID: #21190
image thumbnail

numcmp.m

by Carlos Adrian Vargas Aguilera

 

22 Aug 2008 (Updated 12 Sep 2008)

Compares between numerical arrays up to a certain precision.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
12 Sep 2008

Fixed bug with Infs inputs

Tag Activity for this File
Tag Applied By Date/Time
floating point Carlos Adrian Vargas Aguilera 22 Oct 2008 10:15:40
round Carlos Adrian Vargas Aguilera 22 Oct 2008 10:15:40
compare Carlos Adrian Vargas Aguilera 22 Oct 2008 10:15:40
strcmp Carlos Adrian Vargas Aguilera 22 Oct 2008 10:15:40
mathematics Carlos Adrian Vargas Aguilera 22 Oct 2008 10:15:40

Contact us at files@mathworks.com