and this can happen in the focus loop. It's a pathological situation, so I'll try catch it, but maybe you want to make the function more robust to such calls.
>> tools.math.fit.ransacLinearModel([],[])
Error using randi
First input must be a positive scalar integer value IMAX, or two integer values
[IMIN IMAX] with IMIN less than or equal to IMAX.
Error in tools.math.fit.ransacLinearModel (line 53)
IndRand = randi([1 Npt], NptSim, 1);
I added a comment to the help that H can't be empty.
This should be checked by the upper level, and in this case, it make sense that the focus code will check this.
and this can happen in the focus loop. It's a pathological situation, so I'll try catch it, but maybe you want to make the function more robust to such calls.