File Exchange

image thumbnail


version 1.0 (41.5 KB) by

Check and fix case of function calls



View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

In releases of MATLAB prior to R2011b, entering a function name that did not match any known function name in the given letter case resulted in a warning. After displaying this warning message, MATLAB attempted find a function that would match if letter case were ignored. If such a match were found, MATLAB ran this function instead. In MATLAB R2011b, the MATLAB software generates an error if it can't find an exact-case match.

fixcase attempts to find and offer fixes for function calls with incorrect case by analyzing MATLAB code and checking the MATLAB path. fixcase produces an HTML report. The report provides a summary of issues with links to open and fix the code in the MATLAB editor. You must verify each change because fixcase might produce some inappropriate messages and fixes when MATLAB uses variables in unusual ways. Similarly, fixcase might not correctly analyze method calls.

Comments and Ratings (7)

Ian Noell

Ian Noell (view profile)

fixcase tries to create a backup zip in the current folder when applying a batch fix. This should work as long as you have permission to write to that directory. As running MATLAB as administrator fixed the issue for Ben, I would suggest that the current folder was under matlabroot.


BenK-G (view profile)

For anyone who had the same error as me, simply run MATLAB as an administrator


BenK-G (view profile)

I'm getting the following error when trying to fix my code

Error using zip (line 55)
Could not open "Bad Function" for writing.

Any ideas on how to fix this anybody?

Just a drawback all codes are p-coded.
We cannot choose for example the destination of HTML reports , they go by default under temporary folder/CodeReports

Very useful. Thanks a lot.

Thanks a lot for sharing this code. It helped to quickly detect 150 potential errors from more than 1000 M-files !

MATLAB Release
MATLAB 7.13 (R2011b)
Tags Add Tags

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video