Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
rate = [2,5,4];
price = [8,3,1];
y_correct = 3360;
assert(isequal(earnings(rate,price),3360))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In earnings (line 2)
In ScoringEngineTestPoint1 (line 4)
In solutionTest (line 3)]
|
2 | Pass |
rate = [1,4];
price = [2,1];
y_correct = 576;
assert(isequal(earnings(rate,price),576))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In earnings (line 2)
In ScoringEngineTestPoint2 (line 4)
In solutionTest (line 5)]
|
3 | Pass |
rate = [6 6 2 3 2 8];
price = [3 2 4 8 9 5];
y_correct = 11520;
assert(isequal(earnings(rate,price),11520))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In earnings (line 2)
In ScoringEngineTestPoint3 (line 4)
In solutionTest (line 7)]
|
Getting the indices from a vector
3213 Solvers
Duplicate each element of a vector.
518 Solvers
262 Solvers
289 Solvers
234 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!