This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
dx = pi/10;
x = 0:dx:pi/2;
fx = cos(x([1:end-1])+dx/2);
y_correct = 1.004;
assert(isequal(riemannInt(fx,dx),y_correct))
|
2 | Pass |
dx = 0.1;
x = 0:dx:10;
fx = 3*sin(x([1:end-1])+dx/2);
y_correct = 5.52;
assert(isequal(riemannInt(fx,dx),y_correct))
|
284 Solvers
521 Solvers
444 Solvers
260 Solvers
286 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!