This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 0;
y_correct = 1;
assert(abs(your_fcn_name(x)-y_correct)<0.01)
ans =
1
|
2 | Pass |
x = pi/2;
y_correct = 0;
assert(abs(your_fcn_name(x)-y_correct)<0.01)
ans =
1.2246e-16
|
3 | Pass |
x = pi;
y_correct = -1;
assert(abs(your_fcn_name(x)-y_correct)<0.01)
ans =
-1
|
4 | Pass |
x = 3*pi/2;
y_correct = 0;
assert(abs(your_fcn_name(x)-y_correct)<0.01)
ans =
-2.4493e-16
|
3238 Solvers
686 Solvers
Basics: 'Find the eigenvalues of given matrix
323 Solvers
Find the area of a rectangle if length of the diagonal is given.
130 Solvers
Matlab Basics - Logical Tests I
192 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!