This problem requires more test cases. My solution as many others would fail for a case in which the searched substring is not ordered.
Get the area codes from a list of phone numbers
538 Solvers
185 Solvers
Convert a numerical matrix into a cell array of strings
474 Solvers
Matrix with different incremental runs
254 Solvers
Matrix multiplication across rows
182 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!