This solution is outdated. To rescore this solution, sign in.
Test  Status  Code Input and Output 

1  Pass 
x = [1,1,1,1];
y = [1,1,1,1];
d_correct = true;
assert(isequal(isSortedClockwise(x,y),d_correct))
tf =
logical
1

2  Pass 
x = [1,1,2,2];
y = [1,1,1,1];
d_correct = false;
assert(isequal(isSortedClockwise(x,y),d_correct))
tf =
logical
0

3  Pass 
x = [1,1,2,2];
y = [1,1,1,1];
d_correct = false;
assert(isequal(isSortedClockwise(x,y),d_correct))
tf =
logical
0

4  Pass 
x = [6,7,2,1,1,2];
y = [4,7,13,11,0,5];
d_correct = false;
assert(isequal(isSortedClockwise(x,y),d_correct))
tf =
logical
0

5  Pass 
x = [59,59,55,51,50,46,45,45,39,40,40,41,46,50,50];
y = [68,33, 5,13,28,30,20,10, 8,23,34,45,48,51,51];
d_correct = true;
assert(isequal(isSortedClockwise(x,y),d_correct))
tf =
logical
1

6  Pass 
r=rand(100,15);
a=2*pi*rand(100,1);
d=2*(rand(100,1)>.5)1;
x=r.*cos(a*ones(1,15)+d*2*pi*(0:14)/15);
y=r.*sin(a*ones(1,15)+d*2*pi*(0:14)/15);
assert(all(arrayfun(@(i)isequal(isSortedClockwise(x(i,:),y(i,:)),d(i)<0),1:100)))
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
0
tf =
logical
1
tf =
logical
0
tf =
logical
1
tf =
logical
1
tf =
logical
1

Remove all the words that end with "ain"
1292 Solvers
Return unique values without sorting
588 Solvers
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
168 Solvers
Fahrenheit to Celsius converter
358 Solvers
Convert given decimal number to binary number.
636 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!