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
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".
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office