function draw5(pts,scl) if nargin<2 scl = [-75 75 -25 125]; end % plot hallway floor edges idx = 1:2; plot(pts(idx,1),pts(idx,2),'g','LineWidth',2); hold on idx = 3:4; plot(pts(idx,1),pts(idx,2),'r','LineWidth',2); hold off axis(scl) axis equal
function draw5(pts,scl) if nargin<2 scl = [-75 75 -25 125]; end % plot hallway floor edges idx = 1:2; plot(pts(idx,1),pts(idx,2),'g','LineWidth',2); hold on idx = 3:4; plot(pts(idx,1),pts(idx,2),'r','LineWidth',2); hold off axis(scl) axis equal