subs command does not create symbolic variable?
1 回表示 (過去 30 日間)
古いコメントを表示
I am using MATLAB R2011a. I have symbolic math toolbox installed. When I use the "subs" command to replace a value in a symbolic variable, instead of symbolic variable a normal variable is created ... My code is
>> f=int(g,x)
f =
asin((2*x)/5 - 4/5)/2
>> subs (f,x,3)
ans =
0.2058
What am missing?
2 件のコメント
John D'Errico
2015 年 6 月 19 日
It is difficult to know, since your version is so old. It works fine for me. For eample, since I do not have g, I did this:
syms x
f = asin((2*x)/5 - 4/5)/2
f =
asin((2*x)/5 - 4/5)/2
subs(f,x,3)
ans =
asin(2/5)/2
with no problems. But I am using the current release.
回答 (1 件)
Martin Brown
2015 年 6 月 19 日
You've evaluated
asin((2*3)/5 - 4/5)/2
which is indeed 0.2058. It's no longer symbolic?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!