Cody

Problem 964. McCabe Complexity

Solution 678498

Submitted on 1 Jun 2015 by James
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
%% assert(isequal(McCabe('residue.m'),21)); %2x1 struct array with fields:

ans = 19 ans = 21

2   Pass
%% assert(isequal(McCabe('polyeig.m'),18));

ans = 18

3   Pass
%% assert(isequal(McCabe('roots.m'),7)); % message: 'The McCabe complexity of 'roots' is 7.'

ans = 7

4   Pass
%% assert(isequal(McCabe('decic.m'),14)); %3x1 struct array with fields:

ans = 14