Why Doesn't "clear all" Clear the Assumptions from the Symbolic Engine?

12 ビュー (過去 30 日間)
Paul
Paul 2024 年 9 月 22 日
編集済み: Paul 2025 年 6 月 7 日
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
ans = 
clear all
assumptions
ans = 
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 件のコメント
Paul
Paul 2024 年 9 月 24 日
Tech Support confirmed that this behavior is an "issue" (is that different than a bug?) and may consider fixing it in a future release. I do realize they have reasons to not be concrete about it. Nevertheless, anyone with code that relies on the as-documented, as-previously-implemented behavior might be in for a surprise.
Sam Chak
Sam Chak 2024 年 9 月 24 日

サインインしてコメントする。

採用された回答

Paul
Paul 2025 年 6 月 7 日
編集済み: Paul 2025 年 6 月 7 日
Looks like this is fixed in whatever version of 2024b that Answers is running now as compared to the version it was running when the question was originally posted.
syms x
assume(x < 1)
assumptions
ans = 
clear all
assumptions
ans = Empty sym: 1-by-0

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by