clear, clear all and tic toc time

24 vues (au cours des 30 derniers jours)
selim
selim le 2 Août 2012
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 commentaires
per isakson
per isakson le 2 Août 2012
Did you read the documentation on CLEAR?
Daniel Shub
Daniel Shub le 2 Août 2012
The need for either means you are not using functions and hence not doing it right.

Connectez-vous pour commenter.

Réponse acceptée

venkat vasu
venkat vasu le 2 Août 2012
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.

Plus de réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by