ans = 
Why Doesn't "clear all" Clear the Assumptions from the Symbolic Engine?
Show older comments
According to the doc page assumptions
- To clear all objects in the MATLAB workspace and close the Symbolic Math Toolbox™ engine associated with the MATLAB workspace resetting all its assumptions, use this command
- clear all
Comment: I think the doc page would be clearer if that clause replaced "resetting" with "clearing".
But
syms x
assume(x < 1)
assumptions
clear all
assumptions
I'm quite certain that in previous versions (like 2022a?) the command "clear all" did clear the assumptions from the engine.
Is this a relatively-newly-introduced bug or am I misremembering/misunderstanding the situation?
Answers is running 2024b, I see the same behavior on 2024a.
16 Comments
Paul
on 22 Sep 2024
Animesh
on 22 Sep 2024
I'm using MATLAB R2024a, but I am encountering the issue in R2024b, as mentioned.
Sam Chak
on 22 Sep 2024
At the moment, the workaround of dealing with the issue is to clear the assumptions using the 'assume()' command.

Sam Chak
on 22 Sep 2024
Hi @Paul
The first screenshot was taken using Answers running R2024b. The second screenshot was taken using the basic version of MATLAB Online, which includes the Symbolic Math Toolbox. The "persistant assumptions after clear all" issue has not been filed in the Bug Reports. I hope MathWorks will address it in R2024b Update 1.
Paul
on 22 Sep 2024
Paul
on 23 Sep 2024
Rena Berman
on 23 Sep 2024
@Paul, I will forward this on.
Tushal Desai
on 23 Sep 2024
FYI, we are investigating the issue in Answers where the symbolic outputs appear when editing but are not rendering when viewing the submitted post. I will post an update here when that is fixed in Answers.
Sam Chak
on 23 Sep 2024
Thank you, @Paul, on the method for clearing all of the assumptions. Also thank @Rena Berman and @Tushal Desai for their attention to this matter.
Paul
on 24 Sep 2024
Sam Chak
on 24 Sep 2024
Accepted Answer
More Answers (0)
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

