Unreadable operations when using symbolic functions

1 回表示 (過去 30 日間)
JAVIER
JAVIER 2023 年 12 月 18 日
回答済み: madhan ravi 2023 年 12 月 18 日
Title. Basically everytime I work with symbolic functions or I try to evaluate them, I get answers like this:
Is there any way through I can solve this?

採用された回答

madhan ravi
madhan ravi 2023 年 12 月 18 日
vpa(Gysmbolic, 4)

その他の回答 (1 件)

Karl
Karl 2023 年 12 月 18 日
You can cast from symbolic values to numeric values, for example:
syms z
Gsymbolic = (5581285042669281*z^3)/9007199254740992 ...
+ (5581285042669281*z^2)/36028797018963968 ...
+ (2769712702424631*z)/2251799813685248;
symbolic_value = subs(Gsymbolic,z,1);
numeric_value = double(symbolic_value);
fprintf("symbolic_value = %s\nnumeric_value = %f\n", symbolic_value, numeric_value)
symbolic_value = 72221828452140501/36028797018963968 numeric_value = 2.004558

カテゴリ

Help Center および 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