anyway to clear variable in Matlab workspace from app?
70 views (last 30 days)
Show older comments
Hi:
is there anyway to clear variable in Matlab workspace from app designer?
an workaround I know is to use 'assign' function, to assign an empty value to that variable. but I want know how to clear it.
Thanks!
Yu
2 Comments
Adam Danz
on 31 Aug 2019
Edited: Adam Danz
on 31 Aug 2019
There is rarely a need to clear variables from within a function but sometimes it useful to do so. There should never be a need to clear variables in a different workspace. Without knowing more about what you're doing, the best help I can offer is trying to clean up any reasons why someone would need to do this in the first place.
What workspace is the variable in (the base workspace?), how did it get there, and why does it need to be cleared from within a function (which has its own workspace).
Accepted Answer
More Answers (1)
R.G.
on 31 Aug 2019
To clear variable use 'clear' function instead, ex:
clear('v')
where 'v' is variable name.
3 Comments
See Also
Categories
Find more on Entering Commands 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!