Deleted variables reappearing in workspace.
7 views (last 30 days)
Show older comments
I am running a script with all the variables defined either in the script or in the base workspace. I have changed the names of some of the variables over time to be more concise. After these changes I have saved the workspace as well as all the scripts and functions I have been using. However, when I run one script in particular the old variables keep reappearing in the workspace and are being used by some of the other scripts. I have checked to make sure all names match the variables I want to use plus I have used clear, clearvars, and clearvars -global but they still keep reappearing. I have also tried to rerun my process from the beginning to try and eliminate residual variables. I have even tried to restart MATLAB and my computer to no avail.
Does anyone know of this issue and how to remedy it?
I can add the code here but I do not think it will be of much help. My problem is more with 'non-existing' variables popping up then the code itself. However, if someone thinks it will help I will gladly post it.
Thank you.
0 Comments
Answers (1)
per isakson
on 5 Mar 2014
Seriously, using functions instead of scripts is a large part of the remedy.
See Also
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!