cannot solve for unknown variable

1 回表示 (過去 30 日間)
Md Shariful Islam
Md Shariful Islam 2022 年 7 月 19 日
コメント済み: Md Shariful Islam 2022 年 7 月 19 日
I am trying to solve for unknown variable P in the following code. I determined value of P= 2.945e-5 manually. However, I am not getting that value with the code. As a matter of fact, if I change the constant (1.9664e+08) in the sigma equation, the result is not changing.
Can anyone help in this?
%Constants
L= 300e-6;
O= 5e-6;
theta= atan(2*O/L);
E= 188e9;
w= 1.57e-6;
h= 2.5e-6;
I= (h*w^3)/12;
L_0 = (L/2)*(tan(theta))^2;
%Calculations
syms P real
k= sqrt(P/(E*I));
G= tan((k*L)/4);
L_p= ((tan(theta))^2/(4*k))*( 2*G + k*L + k*L*G^2 + sin(k*L) - 2*G*cos(k*L) - G^2*sin(k*L));
delta_L = L_p - L_0;
sigma = (E/L)*(delta_L + ((P*L)/(E*w*h))) -1.9664e+08==0;
F = vpasolve(sigma, P)

採用された回答

Walter Roberson
Walter Roberson 2022 年 7 月 19 日
vpasolve(sigma, [0 .5e-4])
There is a discontinuity before 1e-4 so if you do not confine the search range the discontinuity can cause search failures
  3 件のコメント
Walter Roberson
Walter Roberson 2022 年 7 月 19 日
fplot(lhs(sigma), [0 1e-4])
Notice how the plot goes up to about 1e11 in the middle
Md Shariful Islam
Md Shariful Islam 2022 年 7 月 19 日
I see!
Thanks for your help.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by