フィルターのクリア

How to find L from the given code?

2 ビュー (過去 30 日間)
Akhtar Jan
Akhtar Jan 2022 年 7 月 30 日
編集済み: Torsten 2022 年 7 月 30 日
clc
close all
lags = 0.6;
k1 = 3;
k_1 = 1;
k2 = 2.5;
k3 = 1;
k_3 = 1;
k4 = 2;
k5 = 1;
E1 = 1;
E2 = 2;
K1 = (k_1+k2)/k1;
K2 = (k_3+k4)/k3;
k3*E2*(L^2+L*(k1*K1+k4+k1*E1)+(E1+K1)*k1*k4+k1*k2*E1)+(L+k3*K2)*(k1*k2*E1+(L+k1*K1+k1*E1)*(L-k5*E1*e^(-L*lags))) = 0;

採用された回答

Torsten
Torsten 2022 年 7 月 30 日
編集済み: Torsten 2022 年 7 月 30 日
lags = 0.6;
k1 = 3;
k_1 = 1;
k2 = 2.5;
k3 = 1;
k_3 = 1;
k4 = 2;
k5 = 1;
E1 = 1;
E2 = 2;
K1 = (k_1+k2)/k1;
K2 = (k_3+k4)/k3;
fun = @(L) k3*E2*(L.^2+L.*(k1*K1+k4+k1*E1)+(E1+K1)*k1*k4+k1*k2*E1)+(L+k3*K2).*(k1*k2*E1+(L+k1*K1+k1*E1).*(L-k5*E1*exp(-L*lags)));
L0 = -1.5;
L1 = fsolve(fun,L0)
Equation solved. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
L1 = -1.6620
L0 = -2.5;
L2 = fsolve(fun,L0)
Equation solved. fsolve completed because the vector of function values is near zero as measured by the value of the function tolerance, and the problem appears regular as measured by the gradient.
L2 = -2.4088
plot((-2.5:0.1:-1),fun(-2.5:0.1:-1))
  1 件のコメント
Akhtar Jan
Akhtar Jan 2022 年 7 月 30 日
Thanks alot sir

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 7 月 30 日
編集済み: Torsten 2022 年 7 月 30 日
syms L
e = exp(sym(1))
e = 
e
lags = 0.6;
k1 = 3;
k_1 = 1;
k2 = 2.5;
k3 = 1;
k_3 = 1;
k4 = 2;
k5 = 1;
E1 = 1;
E2 = 2;
K1 = (k_1+k2)/k1;
K2 = (k_3+k4)/k3;
eqn = k3*E2*(L^2+L*(k1*K1+k4+k1*E1)+(E1+K1)*k1*k4+k1*k2*E1)+(L+k3*K2)*(k1*k2*E1+(L+k1*K1+k1*E1)*(L-k5*E1*e^(-L*lags)))
eqn = 
vpasolve(eqn)
ans = 
There is a second solution near -2.3
  2 件のコメント
Akhtar Jan
Akhtar Jan 2022 年 7 月 30 日
thank you sir
Akhtar Jan
Akhtar Jan 2022 年 7 月 30 日
this one is also helpfull

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

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by