Cody

# Problem 2103. Simple Robotics 1: On track?

Solution 1768302

Submitted on 1 Apr 2019 by William
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
p1=[0.218246;0.224576];%meters p2=[0.769657;0.602542];%meters direction=34.428783;%degrees pointsx=[ 0.350085000000000 0.375000000000000 0.770085000000000 0.753475000000000 0.609915000000000 0.290763000000000 0.301441000000000 0.301441000000000]; pointsy=[ 0.285805000000000 0.400212000000000 0.602331000000000 0.585551000000000 0.497839000000000 0.259873000000000 0.275127000000000 0.275127000000000]; orientations=0*pointsx+direction; orientations(end)=direction+0.6; correctanswers= [ 0 0 1 1 1 0 1 0]; for j=1:length(pointsx) y(j)=isontrack(p1,p2,[pointsx(j); pointsy(j); orientations(j)]); assert(y(j)==correctanswers(j)) end

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!