clear, clear all and tic toc time
21 次查看(过去 30 天)
显示 更早的评论
Hello everyone, What is the difference between ''clear;'' and ''clear all;'' when starting an algorithm? As i see, ''clear all;'' takes much time and erases everything in workspace.
2 个评论
Daniel Shub
2012-8-2
The need for either means you are not using functions and hence not doing it right.
采纳的回答
venkat vasu
2012-8-2
clear Clear variables and functions from memory.
clear removes all variables from the workspace.
clear VARIABLES does the same thing.
clear GLOBAL removes all global variables.
clear FUNCTIONS removes all compiled MATLAB and MEX-functions.
clear ALL removes all variables, globals, functions and MEX links.
clear ALL at the command prompt also clears the base import list.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!