Another unreadable statement. Does anyone else have trouble using backspace in the "comment on solution box"?
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
A = [30 46 16 -46 35 44 18 26 25 -10];
correct = [8 9];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
2 | Fail |
%%
A = [1555 -3288 2061 -4681 -2230 -4538 -4028 3235 1949 -1829];
correct = [3 9];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
3 | Fail |
%%
A = [-1 1 10 -10];
correct = [1 2];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
4 | Fail |
%%
A = [0 1000 -2000 1001 0];
correct = [1 5];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
5 | Fail |
%%
A = [1:1000 0.5];
correct = [1 1001];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
6 | Fail |
%%
% Area codes
A = [847 217 508 312 212];
correct = [2 5];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
7 | Fail |
%%
% Zip codes
A = [60048 61802 01702 60601 10001];
correct = [1 4];
[i1 i2] = nearestNumbers(A);
assert(isequal([i1 i2],correct))
Error: You may not use the command(s) str2func in your code
|
Find relatively common elements in matrix rows
865 Solvers
Reverse the Words (not letters) of a String
297 Solvers
Permute diagonal and antidiagonal
224 Solvers
Number of digits in an integer
336 Solvers
07 - Common functions and indexing 6
348 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!