Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = []; y = [];
y_correct = 'ERROR';
assert(isequal(construct_string(x,y),y_correct))
ans =
[]
|
2 | Pass |
%%
x = [-1]; y = ['a'];
y_correct = 'ERROR';
assert(isequal(construct_string(x,y),y_correct))
ans =
Empty string: 1-by-0
|
3 | Pass |
%%
x = ['a']; y = [5];
y_correct = 'ERROR';
assert(isequal(construct_string(x,y),y_correct))
|
4 | Pass |
%%
r = 10+randi(20); x = [r 1]; y = 'ab';
y_correct(1:r) = 'a'; y_correct(r+1) = 'b';
assert(isequal(construct_string(x,y),y_correct))
ans =
aaaaaaaaaaaaaaaaaaaaaaaaaab
|
5 | Pass |
%%
x = [5 4 3 2 1];
y = '.#4a5';
y_correct = '.....####444aa5';
assert(isequal(construct_string(x,y),y_correct))
ans =
.....####444aa5
|
6 | Pass |
%%
x1 = [1 1 1 1 1 1];
y = 'banana';
assert(isequal(construct_string(x1,y),y))
ans =
banana
|
17120 Solvers
Create a function handle that reverses the input arguments of another function handle
124 Solvers
Back to basics 13 - Input variables
233 Solvers
187 Solvers
find the maximum element of the matrix
348 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!