Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"Not-a-Number" NaN with arithmetical operations


I have a doubt. I am doing a division between two vectors (65356x1 size). Both vectors include 0s and It divides each array element. The problem is when it divides by 0s, operation (0/0), its result is not NaN, is 0!. I think It is wrong... Are there some way to get the correct result (with NaNs)?

The code is very simple: Mat G = im_g/tableReshaped; (where img_g and tableReshaped are 65356x1 matrices).