フィルターのクリア

Must be a text scalar when using eval() function problems?

58 ビュー (過去 30 日間)
Ryan
Ryan 2022 年 9 月 28 日
回答済み: Walter Roberson 2022 年 9 月 28 日
n_stress = F./(t.*w);
n_stress = eval(n_stress);
Error using eval
Must be a text scalar.
Error in Carbon90 (line 55)
n_stress = eval(n_stress);
I am unsure as to why I am having issues using the eval() function with a something(underscore)something as the argument because I have not had this problem before.

採用された回答

Walter Roberson
Walter Roberson 2022 年 9 月 28 日
eval() is defined only for character vectors and string scalars. It is not defined for numeric values, and it is not defined for symbolic expressions.
If you have a symbolic expression that does not have any unbound variables then you should double() the expression. If it has unbound variables then vpa() the expression.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by