Reference to a cleared variable x
34 views (last 30 days)
Show older comments
Reference to a cleared variable x
0 Comments
Accepted Answer
Image Analyst
on 1 Oct 2017
Edited: Image Analyst
on 30 Mar 2020
You used to have x, but now you don't anymore. You cleared it somehow, like by calling the clear() or delete() function. For example, if you have any lines like these inside your function, remove them:
clear all; % Remove this line from inside any function.
clearvars; % Remove this line from inside any function.
clear('x'); % If you have this in your function, remove it.
Can't say much more without seeing your code.
8 Comments
Luigi Frunzo
on 17 May 2023
Moved: Stephen23
on 11 Aug 2023
Thanks! Thanks a lot I am becaming crazy!!!
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!