Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between CLEAR & CLEARVARS

186 views
Skip to first unread message

Chandrakanth

unread,
May 28, 2010, 11:17:22 AM5/28/10
to
Whats the difference between clear and clearvars function. Nothing clearly mentioned in documentation either.

us

unread,
May 28, 2010, 11:39:09 AM5/28/10
to
"Chandrakanth " <sylve...@gmail.com> wrote in message <htomq1$sg0$1...@fred.mathworks.com>...

> Whats the difference between clear and clearvars function. Nothing clearly mentioned in documentation either.

just a thought

CLEAR is the industrial strength vacuum cleaner, which also cleans mem resident functions/classes/other objs, etc (see the help)...
CLEARVARS is TMW's answer to the various KEEP flavours available on the FEX: it cleans var OR keeps vars...

us

Matt Fig

unread,
May 28, 2010, 11:42:22 AM5/28/10
to
I don't think you read the help very thoroughly if you didn't see the difference! Go back and look at the help for CLEAR, specifically the optional arguments, like: all, functions, classes, java.

Chandrakanth

unread,
Jun 3, 2010, 7:51:04 AM6/3/10
to
"Matt Fig" <spam...@yahoo.com> wrote in message <htoo8t$1du$1...@fred.mathworks.com>...

> I don't think you read the help very thoroughly if you didn't see the difference! Go back and look at the help for CLEAR, specifically the optional arguments, like: all, functions, classes, java.

@Matt: I thing I should have been more clear. I meant to ask the difference between following two executions.

>> clear
and
>> clearvars

I know how differently they can be used with options, but without any, is there a difference?

Thanks for replies.

Chandrakanth

unread,
Jun 3, 2010, 8:00:05 AM6/3/10
to
"us " <u...@neurol.unizh.ch> wrote in message <htoo2s$j6j$1...@fred.mathworks.com>...

Good analogy.

0 new messages