How can I access the numerical vector in a sym variable equation for future use in my program as a numerical value?
1 回表示 (過去 30 日間)
古いコメントを表示
>> syms x y
f1=2*(x^2)-(y^2)-9==0;
f1sub=isolate(f1,x);
y0=1;
x1=subs(f1sub,y,y0)
x1 =
x == (2^(1/2)*10^(1/2))/2
I want to be able to acces the numerical part of a symbolic variable, in this case "(2^(1/2)*10^(1/2))/2" for further use in the program as a numerical variable.
I would appreciate any valuable help with this issue.
0 件のコメント
回答 (1 件)
Walter Roberson
2020 年 5 月 25 日
In this situation,
rhs(x1)
For future use, see also children()
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Symbolic Variables, Expressions, Functions, and Preferences についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!