Cody

Solution 1867728

Submitted on 8 Jul 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
toolbox = 'MATLAB'; version = '7.13' assert(isequal(verlessthan(toolbox,version),verLessThan(toolbox,version)))

version = '7.13' v = struct with fields: Name: 'MATLAB' Version: '9.6' Release: '(R2019a)' Date: '04-Jun-2019'

2   Pass
toolbox = 'MATLAB'; version = '8.13' assert(isequal(verlessthan(toolbox,version),verLessThan(toolbox,version)))

version = '8.13' v = struct with fields: Name: 'MATLAB' Version: '9.6' Release: '(R2019a)' Date: '04-Jun-2019'

3   Fail
toolbox = 'Simulink'; version = '8.13' assert(isequal(verlessthan(toolbox,version),verLessThan(toolbox,version)))

version = '8.13' v = struct with fields: Name: 'MATLAB' Version: '9.6' Release: '(R2019a)' Date: '04-Jun-2019'

Insufficient number of outputs from right hand side of equal sign to satisfy assignment. Error in verlessthan (line 3) curver = v(find(ismember({v.Name}, toolbox))).Version; Error in Test3 (line 3) assert(isequal(verlessthan(toolbox,version),verLessThan(toolbox,version)))