Reference to a cleared variable x

34 views (last 30 days)
Reference to a cleared variable x

Accepted Answer

Image Analyst
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
Luigi Frunzo on 17 May 2023
Moved: Stephen23 on 11 Aug 2023
Thanks! Thanks a lot I am becaming crazy!!!
Raúl Acuña
Raúl Acuña on 10 Aug 2023
Moved: Stephen23 on 11 Aug 2023
Thanks

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!