フィルターのクリア

Real solution for a variable in an equation

5 ビュー (過去 30 日間)
M
M 2022 年 8 月 28 日
コメント済み: M 2022 年 8 月 29 日
Hi all, I have an equation and I want to find the real solution (c>0), for eqn, but this code doesn't work. Could you please tell me what is wrong in the below code that I wrote. Thanks in advance for any help
V_plc=0.19;
Kf=0.18;
Kc=0.1;
Kp=0.15;
Kb=0.4;
Kh=0.05;
tau=0.18;
Ktau=0.045;
Vs=0.002;
Kbar=1.5e-5;
Ks=0.1;
Vpm=1.59e-4;
Kpm=0.15;
alpha0=6.81e-6;
alpha1=2.27e-5;
Kce=7;
delta=0.1;
gamma=5.5;
Kplc=0.055;
k_i=2;
ct=0.07;
syms c
p=(V_plc.*c.^2/(c.^2+Kplc.^2))./k_i;
h=Kh.^4./(Kh.^4+c.^4);
Po=((p.^2)*(c.^4).*h)./((p.^2).*(c.^4).*h.*(1+Kb)+Kb.*Kp.^2*(Kc.^4+c.^4-((c.^4*Kh.^4)./(c.^4+Kh.^4))));
jpm=Vpm.*(c.^2/(c.^2+Kpm.^2));
eqn=(((alpha1.*Kce.^4)./(jpm-alpha0))-Kce.^4).^(1/4)-((Vs.*c.^2)./(Kf.*Po.*(c.^2+Ks.^2)))-c==0;
S = solve(eqn,c,'Real',true)

採用された回答

Chunru
Chunru 2022 年 8 月 29 日
V_plc=0.19;
Kf=0.18;
Kc=0.1;
Kp=0.15;
Kb=0.4;
Kh=0.05;
tau=0.18;
Ktau=0.045;
Vs=0.002;
Kbar=1.5e-5;
Ks=0.1;
Vpm=1.59e-4;
Kpm=0.15;
alpha0=6.81e-6;
alpha1=2.27e-5;
Kce=7;
delta=0.1;
gamma=5.5;
Kplc=0.055;
k_i=2;
ct=0.07;
syms c
p=(V_plc.*c.^2/(c.^2+Kplc.^2))./k_i;
h=Kh.^4./(Kh.^4+c.^4);
Po=((p.^2)*(c.^4).*h)./((p.^2).*(c.^4).*h.*(1+Kb)+Kb.*Kp.^2*(Kc.^4+c.^4-((c.^4*Kh.^4)./(c.^4+Kh.^4))));
jpm=Vpm.*(c.^2/(c.^2+Kpm.^2));
% eqn=(((alpha1.*Kce.^4)./(jpm-alpha0))-Kce.^4).^(1/4)-((Vs.*c.^2)./(Kf.*Po.*(c.^2+Ks.^2)))-c==0;
% S = solve(eqn,c,'Real',true)
% The function you specified is a complex function that has no solution.
% Check out abs(f) which never reaches to 0.
f1= (((alpha1.*Kce.^4)./(jpm-alpha0))-Kce.^4).^(1/4)-((Vs.*c.^2)./(Kf.*Po.*(c.^2+Ks.^2)))-c;
fplot(real(f1), [0 1]); hold on
fplot(imag(f1), [0 1])
fplot(abs(f1), [0 1])
ylim([-1 1]*5)
xlim([0 0.4])
  2 件のコメント
Chunru
Chunru 2022 年 8 月 29 日
But it is proved that your problem has no real solution.
M
M 2022 年 8 月 29 日
Yeah that's true...

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by