Rank: 195152 based on 0 downloads (last 30 days) and 0 file submitted
photo

Andrei Rotenstein

E-mail
Company/University
York University
Lat/Long
90.0, -135.0

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Andrei
Updated File Comments Rating
17 Sep 2010 MATLAB xUnit Test Framework MATLAB xUnit is a unit test framework for MATLAB code. Author: Steve Eddins

Steve,

Although 'absolute' and 'relative' tolerances are sufficient certainly for most unit testing situations in signal processing, I feel that what's lacking is equality testing to a definable level of precision (i.e. in the mantissa).

To this end, I've added support 'precision' as a new ToleranceType. I've added support for the string ''precision'' in the obvious way to ParseFloatAssertInputs, and to CompareFloats.m, I've added to the switch block:

switch params.ToleranceType

the following new case:

case 'precision'

coreCompareFcn = @(A, B) magFcn(chop(A,params.Tolerance) - chop(B,params.Tolerance)) <= eps(max(magFcn(A), magFcn(B)));

I hope that others may find this useful.

Contact us