How can i remove loaded *.mat file from workspace?
20 views (last 30 days)
Show older comments
Can any one please tell me
0 Comments
Answers (1)
Raj
on 5 Mar 2019
Use "clear all" command to clear your workspace. Be sure to save it first if you intend to reuse it again in future.
3 Comments
Walter Roberson
on 5 Mar 2019
Use clearvars unless you know exactly what clear all does.
But better is to assign the result of load() to a variable, which will return a structure with one field for each variable in the file. Access the appropriate structure field. Then to remove what was loaded, just clear the structure.
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!