Prev: Undefined function or method 'matscale' for input arguments of type 'double'.
Next: [Mapping Toolbox] strange Grid at Matlab2010a
From: dpb on 9 May 2010 12:55 dhanamjaya rao wrote: .... > instead of '==' i have used 'abs(s(j)-y(k))<1' .... > pease let me know if it is wrong.... Right idea, yes...you'll likely want to make the bound smaller than unity, however. Again from the FAQ... > areEssentiallyEqual = abs(a-b) < tol > % for some small value of tol relative to a and b > % perhaps defined using eps(a) and/or eps(b) --
From: dpb on 9 May 2010 13:52
dpb wrote: > dhanamjaya rao wrote: > ... > >> instead of '==' i have used 'abs(s(j)-y(k))<1' .... >> pease let me know if it is wrong.... > > Right idea, yes...you'll likely want to make the bound smaller than > unity, however. > > Again from the FAQ... > >> areEssentiallyEqual = abs(a-b) < tol >> % for some small value of tol relative to a and b >> % perhaps defined using eps(a) and/or eps(b) Oh, meant to add... You'll probably want to consider what happens w/ x+iy and x-iy w/ abs() in constructing the actual areEssentiallyEqual() test function for complex, too... -- |