function h = HW2b %% Basic Planning app. global obstacles; global startloc startloc = [0,0]; global endloc; endloc = [0,0]; %init hold on %addObstacle; %pick start and end disp('Choose start location'); [startloc(1),startloc(2),button] = ginput(1); plot(startloc(1),startloc(2),'go') disp('Choose end location'); [endloc(1),endloc(2),button] = ginput(1); plot(endloc(1),endloc(2),'rx') disp(startloc) disp(endloc)