Problem 964. McCabe Complexity

The Challenge is to return the McCabe complexity for various functions.
One way to determine the McCabe Complexity is to use the form:
checkcode -cyc polyval.m
which returns: L 1 (C 23-29): The McCabe complexity of 'polyval' is 19.
Input: Function name (string)
Output: McCabe Complexity (numeric)
Example:
For 'polyval.m' the expected output is 19.
For some functions there are structures and fields which complicates finding the McCabe complexity value.
The McCabe complexity is used in the scoring of the Matlab Semi-annual contests. Complexities higher than 10 induce severe penalties.

Solution Stats

25.0% Correct | 75.0% Incorrect
Last Solution submitted on Jun 10, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers39

Suggested Problems

More from this Author308

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!