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 ExchangeSymbolic Math Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by