-
3 Comments
I think that the test 2 must be checked.
I compared the test 2 correct answer with the program output using strcmp, and it gave 1 as output.( This was before introducing the program lines which also take into consideration the single space given in 5th element of in_cell in test 2)
Anyone, who has solved or has an idea how to solve, Please let me know what is the error in my program.
Thanks, By the way, program might be a bit lengthy.
THE TEST CASE 2 OUTPUT YOU HAVE DISPLAYED IS WRONG
CORRECT IT.
There are two issues here:
(1) The HTML display in Cody automatically only displays a single space. Therefore, while the solution *vector* _specified_ as the answer to Test 2 in Cody is correct, the *text* that is _displayed_ is not. You can confirm that the correct information was specified by viewing the HTML source. It is unfortunate that this is not displayed correctly. Of course, any results should match the solution, not the incorrect display.
(2) Your candidate solution fails because it is incorrect. Even if it matches the HTML-parsed display, it doesn't match the true specified solution vector. To make this apparent, imagine if delim='^' (no other changes). The correct solution to Test 2 would then be 'this^one^^has^ ^some tricky^stuff', whereas your output would be 'this^one^has^ ^some tricky^stuff' (provided in Solution 1280078). In other words, you needed a double space between "one" and "has".
Suggested Problems
1842 Solvers
Read a column of numbers and interpolate missing data
1716 Solvers
448 Solvers
Back to basics - mean of corner elements of a matrix
338 Solvers
Check that number is whole number
2357 Solvers
More from this Author95
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!