alpha approaches r as m approaches 0 in
alpha=(-2+m+sqrt(4-4*m+m^2+8*m*r))/(2*m)
but
does matlab have any built-in function (like mathematica's Chop) that
replaces near-0 values by 0, or do I have to write one myself? (I could
use it to replace near-0 values of m by 0, and then replace all zeroes by
0.0001. Or is there an even more elegant solution?)
--
Joshua A. Solomon
http://www.staff.city.ac.uk/~solomon
alpha=(-2+m+sqrt(4-4*m+m^2+8*m*r))/(2*m)
but
>>m=0.000000000000000001;r=42;(-2+m+sqrt(4-4*m+m^2+8*m*r))/(2*m)ans = 0. :-(
does matlab have any built-in function (like mathematica's Chop) that
replaces near-0 values by 0, or do I have to write one myself? (I could
use it to replace near-0 values of m by 0, and then replace all zeroes by
0.0001. Or is there an even more elegant solution?)
--
Joshua A. Solomon
http://www.staff.city.ac.uk/~solomon