From: Chandrakanth on
Whats the difference between clear and clearvars function. Nothing clearly mentioned in documentation either.
From: us on
"Chandrakanth " <sylvercloud(a)gmail.com> wrote in message <htomq1$sg0$1(a)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
From: Matt Fig on
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.
From: Chandrakanth on
"Matt Fig" <spamanon(a)yahoo.com> wrote in message <htoo8t$1du$1(a)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.
From: Chandrakanth on
"us " <us(a)neurol.unizh.ch> wrote in message <htoo2s$j6j$1(a)fred.mathworks.com>...
> "Chandrakanth " <sylvercloud(a)gmail.com> wrote in message <htomq1$sg0$1(a)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

Good analogy.