This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
r = 15;
m = 4;
function y = OddRow(r,m)
y_correct = [1 5 9 13];
assert(isequal(OddRow(x),y_correct))
end
|
2 | Pass |
r = 21;
m = 6;
function y = OddRow(r,m)
y_correct = [1 7 13 19];
assert(isequal(OddRow(x),y_correct))
end
|
3 | Pass |
r = 31;
m = 8;
function y = OddRow(r,m)
y_correct = [1 9 17 25];
assert(isequal(OddRow(x),y_correct))
end
|
4 | Pass |
r = 27;
m = 4;
function y = OddRow(r,m)
y_correct = [1 5 9 13 17 21 25];
assert(isequal(OddRow(x),y_correct))
end
|
Return a list sorted by number of occurrences
1504 Solvers
Back to basics 21 - Matrix replicating
1052 Solvers
227 Solvers
358 Solvers
Replace every 3rd element in a vector with 4
170 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!