Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
minV = -10;
maxV = 10;
y_correct = 1;
assert(isequal(round(validAverage(x,minV, maxV),4),y_correct))
y =
1
|
2 | Fail |
x = [-1 -5.4 14.6 20.9 25.5 -22.4 18 15.5 -33.7 -38.1];
minV = -10;
maxV = 10;
y_correct = -3.2;
assert(isequal(round(validAverage(x,minV, maxV),4),y_correct))
|
3 | Fail |
x=1:100;
minV=20;
maxV=80;
y_correct = 50;
assert(isequal(round(validAverage(x,minV, maxV),4),y_correct))
|
686 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
1491 Solvers
495 Solvers
Switch matrix to a column vector
260 Solvers
261 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!