Is there a limit to the number of characters used in a symbolic expression?

My symbolic expression is scaled using another parameter. The expression contains only additions and multiplications and no divisions.
Everything works as it should for increasing the value of the parameter until it reaches a certain limit after which it generates NaN.
It works when l = length(char(sym_expr)) < 11000 but does not work when l = length(char(sym_expr)) > 13000
Is there a size limit to the length of the symbolic expression? I could not find this information in the documents

 Réponse acceptée

Matt Fig
Matt Fig le 3 Oct 2012
Modifié(e) : Matt Fig le 3 Oct 2012
This works.
str = ['y ', sprintf('+ %i',1:6000)];
syms y,y=1;
subs(str)
length(str) % >1300
Fixed a typo......

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by