Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
p=[0 0];
v=[1 -1];
w=[1 1];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2));
assert(abs(d-1)<.005)
|
2 | Pass |
p=[0 0];
v=[-1 2];
w=[1 2];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2));
assert(abs(d-2)<.005)
|
3 | Pass |
p=[0 0];
v=[-1 -1];
w=[1 1];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2));
assert(abs(d)<.005)
|
4 | Pass |
p=[1 1];
v=[0 3];
w=[3 0];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2));
assert(abs(d-1/2^.5)<.005)
|
5 | Pass |
p=[5 0];
v=[0 3];
w=[3 0];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2));
assert(abs(d-2)<.005)
|
6 | Pass |
p=[0 6];
v=[0 3];
w=[3 0];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2));
assert(abs(d-3)<.005)
|
7 | Pass |
p=[-4 0];
v=[0 3];
w=[-3 0];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2))
assert(abs(d-1)<.005)
d =
1
|
8 | Pass |
p=[1 0];
v=[1.01 0];
w=[5 5];
d=distP2S(p(1),p(2),v(1),v(2),w(1),w(2))
assert(abs(d-.01)<.005)
d =
0.0100
|
17120 Solvers
Who knows the last digit of pi?
557 Solvers
Rotate and display numbered tile
238 Solvers
Basics: 'Find the eigenvalues of given matrix
322 Solvers
376 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!