Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
str = 'b';n=5
y_correct = 'bbbbb';
assert(isequal(duplicate_char(str,n),y_correct))
n =
5
ans =
'bbbbb'
|
2 | Pass |
str = 's';n=1
y_correct = 's';
assert(isequal(duplicate_char(str,n),y_correct))
n =
1
ans =
's'
|
3 | Pass |
str = 'b';n=10
y_correct = 'bbbbbbbbbb';
assert(isequal(duplicate_char(str,n),y_correct))
n =
10
ans =
'bbbbbbbbbb'
|
4 | Pass |
str = 'b';n=0
y_correct = '';
assert(isequal(duplicate_char(str,n),y_correct))
n =
0
ans =
0×0 empty char array
|
5 | Pass |
str = '?';n=2
y_correct = '??';
assert(isequal(duplicate_char(str,n),y_correct))
n =
2
ans =
'??'
|
280 Solvers
Sum all integers from 1 to 2^n
8417 Solvers
306 Solvers
07 - Common functions and indexing 6
348 Solvers
273 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!