Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
A = [10 15 20 10];
W = [ 1 1 1 1];
Y = 13.75
assert(isequal(weighted_average(A,W),Y))
Y =
13.7500
|
2 | Pass |
A = [ 10 15 20 10];
W = [0.25 0.25 0.25 0.25];
Y = 13.75
assert(isequal(weighted_average(A,W),Y))
Y =
13.7500
|
3 | Pass |
A = [10 15 20 10];
W = [ 2 4 4 2];
Y = 15
assert(isequal(weighted_average(A,W),Y))
Y =
15
|
4 | Pass |
assert(~any(strfind(lower(fileread('weighted_average.m')),'regexp')))
|
5 | Pass |
assert(~any(strfind(lower(fileread('weighted_average.m')),'feval')))
|
6 | Pass |
assert(~any(strfind(lower(fileread('weighted_average.m')),'eval')))
|
Find the numeric mean of the prime numbers in a matrix.
6781 Solvers
Replace NaNs with the number that appears to its left in the row.
2018 Solvers
Replace multiples of 5 with NaN
358 Solvers
Create an n-by-n null matrix and fill with ones certain positions
268 Solvers
338 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!