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

 Accepted Answer

This works.
str = ['y ', sprintf('+ %i',1:6000)];
syms y,y=1;
subs(str)
length(str) % >1300
Fixed a typo......

More Answers (0)

Categories

Products

Community Treasure Hunt

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

Start Hunting!