Clears space in memory by setting matrices equal to scalar zero.
clear x, y
A = rndn(1000, 1000); /* ** Code that uses 'A' would be here ** Free memory holding 'A' */ clear A;
If your program is running out of memory, or uses considerable system
clear() to deallocate large matrices after they are no
longer needed may allow it to run more efficiently.
is equivalent to
x = 0;
Matrix names are retained in the symbol table after they are cleared.
Matrices can be cleared even though they have not previously been
clear() can be used to initialize matrices to scalar 0.