フィルターのクリア

Matlab live script wont simplify my final answer which includes pi

2 ビュー (過去 30 日間)
Nicholas Connolly
Nicholas Connolly 2021 年 4 月 1 日
回答済み: Cris LaPierre 2021 年 4 月 1 日
I have a equation such as this:
mdot = 6.05E-4;
rho = 1.204;
Ac = 0.0050265;
V = mdot/(rho*Ac)
Then when my answer comes out for V, it equals this:
3098476543630901248pi/97341511467911328125
Which equals 0.1, which is the correct answer, but why cant it just show me that?
Thanks for the help!

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 4 月 1 日
What version of MATLAB are you using? Have you declared anything symbolically?
When I run your code here, it returns 0.1
mdot = 6.05E-4;
rho = 1.204;
Ac = 0.0050265;
V = mdot/(rho*Ac)
V = 0.1000

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by