How to solve "Maximum recursion limit of 500 reached." error

39 views (last 30 days)
I have been getting an error in Matlab program for a long time. I also tried deleting and reinstalling the program but I still keep getting the same error.
It doesn't even handle the simplest "clc" or "clear all" code I've written on the code or the command window.
Error in clc (line 1)
clc
Caused by: Maximum recursion limit of 500 reached.

Answers (1)

Steven Lord
Steven Lord on 12 Jun 2021
You've created a script file clc.m that tries to call the built-in clc function on its first line. The clc.m you've created takes precedence over the built-in clc, so clc.m tries to call clc.m which tries to call clc.m ...
Rename or remove your clc.m file.

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!