[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41674] image package: temporary arrays in imr

From: Ian Journeaux
Subject: [Octave-bug-tracker] [bug #41674] image package: temporary arrays in imresize are doubles
Date: Thu, 27 Feb 2014 14:45:12 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36

Follow-up Comment #2, bug #41674 (project octave):

For the comparisons to be valid, would you need to specify a tolerance when
doing the comparison?

Perhaps something like this?

XD = linspace (1, 10, 12);
YD = linspace (1, 20, 15);
XDs = single(XD);
YDs = single(YD);
%# absolute tolerance equality
isequalAbs = @(x,y,tol) (abs(x-y) <= tol );

if(all(isequalAbs(XD, XDs, 1e-6)) && all(isequalAbs(YD, YDs, 1e-6))) 
%if all(XD == XDs) && all(YD == YDs)
   XD = XDs;
   YD = YDs;
clear XDs YDs


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]