Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 0;
y_correct = 1;
assert(abs(my_func(x)-y_correct)<0.0001)
ans =
1
|
2 | Pass |
x = pi/2;
y_correct = 0;
assert(abs(my_func(x)-y_correct)<0.0001)
ans =
6.1232e-17
|
3 | Pass |
x = rand(1)*2*pi;
y_correct = cos(x);
assert(abs(my_func(x)-y_correct)<0.0001)
ans =
0.9997
|
4 | Pass |
assessFunctionAbsence({'sin','cos'}, 'FileName', 'my_func.m')
|
Who knows the last digit of pi?
557 Solvers
Matrix indexing with two vectors of indices
485 Solvers
856 Solvers
321 Solvers
07 - Common functions and indexing 4
319 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!