Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 0:0.01:pi;
y = sin(x);
y_correct = 1.57;
assert(abs(argmax(x,y) - y_correct) < 0.01 )
xx =
158
|
2 | Pass |
x = 0:0.01:pi;
y = x.^2;
y_correct = 3.14;
assert(abs(argmax(x,y) - y_correct) < 0.01 )
xx =
315
|
3 | Pass |
x = 0:0.01:pi;
y = -(x-.42).^2;
y_correct = .42;
assert(abs(argmax(x,y) - y_correct) < 0.01 )
xx =
43
|
4 | Pass |
x = -100:0;
y = -cosh(x+3);
y_correct = -3;
assert(abs(argmax(x,y) - y_correct) < 0.01 )
xx =
98
|
1365 Solvers
965 Solvers
130 Solvers
Find out sum of prime number till given number
125 Solvers
251 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!