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

 채택된 답변

Matt Fig
Matt Fig 2012년 10월 3일
편집: Matt Fig 2012년 10월 3일
This works.
str = ['y ', sprintf('+ %i',1:6000)];
syms y,y=1;
subs(str)
length(str) % >1300
Fixed a typo......

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by