I have a sector defined by the following code.
x0=12;y0=13;theta =30;r=3a1 = 2*pi*rand; % A random direction
a2 = a1 + theta; t = linspace(a1,a2); x = x0 + r*cos(t); y = y0 + r*sin(t); plot([x0,x,x0],[y0,y,y0],'k-')
I want to check if a point, say [12.5 11.5] lies within the sector defined. Thanks in advance.
Best Answer