Avoid: 'Warning: Unable to display symbolic object because 'symengine' was reset. Repeat commands..'' in R2024a in repeated execution of simple scripts with symbolic commands

119 次查看(过去 30 天)
(Only R2024a, I cannot reproduce the problem in R2023a)
There is a few lines of code using symbolic toolbox. After MATLAB startup they perform well (free of warning or error) but second execution results in error message: 'Warning: Unable to display symbolic object because 'symengine' was reset. Repeat commands to regenerate result.'
To execute the code below with expected behaviour MATLAB needs to be re-started. Maybe there is a way to clear/reset the symengine? Second question is why this calculation fails at all?
%% Symmetrisches Optimum nach Taschenbuch der Regelungstechnik
clear all; close all; clc; %reset(symengine)
% diesmal symbolischer Beginn
syms s KS TE T0 a %TN
strecke = 1/(T0 * s) * KS/(1+s * TE)
% Wahl
TN = a * a * TE % a > 0. Oft a=2
More confusing to me is that direct execution of the symbolic part (F9) is free of warning, then executing the scipt file test.m is free of warning in the first place. Second execution reproduces the warning (error in performance).

回答(1 个)

Harald
Harald 2024-4-11
Hi,
this seems to be due to a bug in R2024a which is fixed with the Update 1 release that is expected to become available to all users by end of next week (April 18).
The bug is specific to using Symbolic Math Toolbox together with clear all. I typically discourage using clear all as this clears more than necessary in most cases:
If you still experience issues without using clear all or after installing the update release, please contact Technical Support for further investigation.
Best wishes,
Harald

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by