Cody

Solution 454343

Submitted on 12 Jun 2014 by Alfonso Nieto-Castanon
  • Size: 41
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% first = 'minimum'; second = 'maximum'; match = substrmatch( first, second ); assert( strcmp( match, 'imum' ) )

2   Pass
%% first = 'aabbcc'; second = 'abc'; match = substrmatch( first, second ); assert( strcmp( match, 'ab' ) || strcmp( match, 'bc' ) )

3   Pass
%% first = 'MATLAB'; second = 'LAPACK'; match = substrmatch( first, second ); assert( strcmp( match, 'LA' ) )

4   Pass
%% first = 'abc'; second = 'def'; match = substrmatch( first, second ); assert( strcmp( match, '' ) )