MATLAB: Inf problem


I'm working on video, and have alot of computations in my processes. in one part i divide a number on another one, but I receive wrong result.
for example:
1.000000000000000e-03/ 1.000000000000000e-03+ 0
how can i handle this?
I use format short, but it doesn't help me.
please help

Best Answer

  • You probably want (note the brackets):
    m12 = deltaR12 / (min(deltaRF(ii, jj, tt), deltaRF_V(ii, jj, tt)) + epsilon);
    Your code, as is divides deltaR12 by min(..,..), and then adds epsilon to the result of the division, which I suspect is not what you want.