To solve some PDE, I have to set NumericQ[n]=True
on some symbol to get a solution, else Mathematica will not solve it.
When I tried ClearAll[n]
later on, above command effect was not removed.
I need to clear it, so that later commands do not fail, since now doing n>0
will fail because I did NumericQ[n]=True
before.
Doing ClearAll[n]
have no effect. It still fails.
Here is a MWE
(*new kernel *)
NumericQ[n]=True;
n>0
Greater::nord2: Comparison of n and 0 is invalid.
Ok, Mathematica does not like to compare n
with zero. So I do
ClearAll[n];
And try again
n>0 (*still gives same error as above*)
I looked at OwnValues@n
and UpValues@n
and DownValues@n
and SubValues@n
and they all give {}
One way I found is to do NumericQ[n]=False;
and this works. But I do not understand why ClearAll[n]
does not work.
Thanks to comment below by Anjan Kumar Remove[n]
also removes the effect.
My question is, why ClearAll[n]
did not work?
Mathematica 11.3 on windows.
Remove[n]
? $\endgroup$Remove
works. But do you know whyClearAll
does not work? May be I'll change the question to why clearAll does not work. $\endgroup$