フィルターのクリア

How to use Matlab to solve equation like Mathcad

10 ビュー (過去 30 日間)
Jason Ciou
Jason Ciou 2022 年 7 月 8 日
回答済み: Karim 2022 年 7 月 8 日
Hi Guys,
How to use Matlab to solve equation like Mathcad.
I would like to solve below equation, but I don't know how to solve it in Matlab, could someone give me some suggestions, thanks.
  2 件のコメント
KSSV
KSSV 2022 年 7 月 8 日
Read about solve
Jason Ciou
Jason Ciou 2022 年 7 月 8 日
Hi @KSSV
I try to read solve and use that, but Matlab can't solve the equation.

サインインしてコメントする。

採用された回答

Karim
Karim 2022 年 7 月 8 日
Use the symboic toolbox to determine the equations, see below.
syms fp1 fp2 fz1 fz2 fc boost real
eqn = boost == ( atan(fc/fz1) + atan(fc/fz2) - atan(fc/fp1) - atan(fc/fp2) ) * 180/pi
eqn = 
fp2_eqn = solve(eqn, fp2)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
fp2_eqn = 
% evaluate the solution by filling in some parameters
fz1 = 1239;
fp1 = 50000;
fc = 10000;
fz2 = fz1;
boost = 94.26;
fp2 = -fc/(tan(atan(fc/fp1) - atan(fc/fz1)- atan(fc/fz2) + pi*boost/180))
fp2 = 5.7029e+03
% print a string with 17 decimal numbers to compare with mathcad
fp2_s = sprintf('%4.17f',fp2)
fp2_s = '5702.93635357467974245'

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by