I have this strange error 'Subscript indices must either be real positive integers or logicals' which most of the times pops up. There a few times though that it doesn't. My code is kind of huge and it has to do with calculating the voronoi diagram without using the voronoi function of MATLAB. The error occurs in one of the bellow code parts each time:
if (PossibleVoronoiPoints(m,2)-Slope(k)*PossibleVoronoiPoints(m,1)-c(k)>0)
or
if (PossibleVoronoiPoints(n,2)-Slope(k)*PossibleVoronoiPoints(n,1)-c(k)<0)
Can anyone help me understand what's going on? If you need the whole code i'll post it with comments if necessary.