Reference to a cleared variable x

 采纳的回答

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 个评论

To solve this problem, simply remove "clear all" from the function
saved my day.Thanks
Thanks
Thanks
Thanks
Sara
Sara 2023-2-13
移动:Stephen23 2023-8-11
Thanks
Thanks! Thanks a lot I am becaming crazy!!!
Thanks

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Programming 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by