This is a correct solution - alas using a function handle, not an m-file
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
[q,r] = swapInputs(5,10);
assert(isequal(q,10));
assert(isequal(r,5));
|
2 | Fail |
[q,r] = swapInputs(magic(3), 'hello, world');
assert(isequal(q,'hello, world'));
assert(isequal(r,magic(3)));
|
3 | Fail |
[q,r] = swapInputs({}, NaN);
assert(isnan(q));
assert(iscell(r) && isempty(r));
|
2110 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
209 Solvers
Getting the absolute index from a matrix
176 Solvers
377 Solvers
341 Solvers