フィルターのクリア

Issue With Integration Output

1 回表示 (過去 30 日間)
Stephen
Stephen 2011 年 12 月 7 日
I'm thinking this is a basic problem, but can't find an answer anywhere and have been unable to resolve it myself :/
When I integrate it always gives the output as an equation rather then an actual number. The equation it outputs can be put back into matlab and it'll give an actual answer but for the life of me I can't work out how to make it do this straight away.
For example the following;
syms x;
a=int((x^4), x, 2, 0)
Gives the output;
b =
-32/5
But I want it to give the output;
b =
-6.4000
How do I do this? I'm sure it's something simple but just can't work out (or find) how to do it :(

採用された回答

Andrei Bobrov
Andrei Bobrov 2011 年 12 月 7 日
out = vpa(a,5) % sym class
out = double(a) % double class
out = eval(a) % double class

その他の回答 (0 件)

カテゴリ

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