Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
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)
|
2 | Pass |
x=3; y=4; A=3; B=4; C=5;
y_correct = 6;
assert(normalLen(x,y,A,B,C)-y_correct==0)
|
3 | Pass |
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)
7.4000
|
4 | Pass |
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)
12345
|
5 | Pass |
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)
12345
|
9823 Solvers
Test if a Number is a Palindrome without using any String Operations
181 Solvers
251 Solvers
Get the length of a given vector
3559 Solvers
359 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!