how do i present the variable W with the 2 digits after the decimal point?
古いコメントを表示
i=0.15; v=24;
c=25*10^-6;
R=140; L=260*10^-3;
syms W
eqn = i==v/sqrt((R^2)+(W*L-1/W*c)^2);
W = solve(eqn,W);
w= round(W)
回答 (1 件)
Purushottama Rao
2015 年 5 月 14 日
編集済み: Purushottama Rao
2015 年 5 月 14 日
format bank
w
5 件のコメント
Purushottama Rao
2015 年 5 月 14 日
BEFORE DISPLAYING YOUR RESULT, use format bank command
Idan Nagar
2015 年 5 月 14 日
Purushottama Rao
2015 年 5 月 14 日
編集済み: Purushottama Rao
2015 年 5 月 14 日
You may use as well
sprintf('%.2f', W);
Purushottama Rao
2015 年 5 月 14 日
>> w=1.2345
w =
1.2345
>> sprintf('%.2f',w)
ans =
1.23
>>
Walter Roberson
2015 年 5 月 14 日
double() the symbolic number to get floating point.
カテゴリ
ヘルプ センター および File Exchange で Multirate Signal Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!