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

 Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by