Why are there 2 apostrophes in answer of 2nd test?
Because if you do not double up (''), the single apostrophe is read by MATLAB as the end of the character vector. This is how you get around this.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
s1 = 'Jack and Jill went up the hill';
s2 = 'a a i e u e i';
assert(isequal(s2,refcn(s1)))
s2 =
' a a i e u e i '
|
2 | Fail |
s1 = 'I don''t want to work. I just want to bang on the drum all day.';
s2 = 'I o'' a o o. I u a o a o e u a a.';
assert(isequal(s2,refcn(s1)))
s2 =
'I o ' a o o . I u a o a o e u a a .'
|
6720 Solvers
3238 Solvers
Create a Multiplication table matrix...
283 Solvers
Create a two dimensional zero matrix
354 Solvers
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
761 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!