It is easily possible for two finite nonzero numbers to have a quotient so large that Matlab must give 'inf' as its value. For example
x = 0.01*realmax;
y = 0.0001;
q = x/y;
I suggest you make a study of the corresponding x and y values that give rise to your inf values to see what kinds of number pairs are involved.