Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%% test 1
x=2; y=2; A=2; B=2; C=-4;
y_correct = 1.4142;
assert(abs(normalLen(x,y,A,B,C)-y_correct)<=1e-4)
P =
1.4142
ans =
[]
|
2 | Pass |
%% test 2
x=3; y=4; A=3; B=4; C=5;
y_correct = 6;
assert(normalLen(x,y,A,B,C)-y_correct==0)
P =
6
ans =
[]
|
3 | Pass |
%% test 3
x=4; y=5; A=3; B=4; C=5;
y_correct = 7.4;
display(normalLen(x,y,A,B,C))
assert(abs(normalLen(x,y,A,B,C)-y_correct)<1e-1)
P =
7.4000
ans =
[]
ans =
7.4000
P =
7.4000
ans =
[]
|
4 | Pass |
%% test 4
x=0;y=12345;A=0;B=1;C=0;
y_correct = 12345;
display(normalLen(x,y,A,B,C))
assert(abs(normalLen(x,y,A,B,C)-y_correct)==0)
P =
12345
ans =
[]
ans =
12345
P =
12345
ans =
[]
|
5 | Pass |
%% test 5
x=0;y=-12345;A=0;B=1;C=0;
y_correct = 12345;
display(normalLen(x,y,A,B,C))
assert(abs(normalLen(x,y,A,B,C)-y_correct)==0)
P =
12345
ans =
[]
ans =
12345
P =
12345
ans =
[]
|
Similar Triangles - find the height of the tree
156 Solvers
Getting the indices from a matrice
268 Solvers
204 Solvers
377 Solvers
Area of an equilateral triangle
1706 Solvers