Solving nonlinear equations numerically with fsolve

2 ビュー (過去 30 日間)
Anand Varadharajan
Anand Varadharajan 2020 年 3 月 10 日
回答済み: Walter Roberson 2020 年 3 月 11 日
Hi all,
How can I compute the unknowns k,a,b in the attachment with non linear equations?
I defined the fuction as:
function F=func1(x);
a=x(1);
b=x(2);
k=x(3);
F(1)=((a^3)-((6*(1-u^2)*Pn)/(pi*E*ROW_INV1*(1-k^2))))*(integral(((1-k^2.*t^2)/(1.-t^2))*dt),0,1);
F(2)=((b^3)-((6*(1-u^3)*Pn*(1-k^2)^(3/2))/(pi*E*ROW_INV1)))*(integral(((1-k^2.*t^2)/(1.-t^2))*dt),0,1);
F(3)=k*a-(sqrt(a^2-b^2));
end
and then called the function as:
x0=[1,1,1]
syms a b k;
x= fsolve(@func1,x0)
But this is not working.
I get an error:

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 3 月 11 日
Your function uses dt, E, Pn, ROW_INV1, t, u without defining them.
Furthermore, you call integral(expression, lower bound, upper bound) but the first parameter to integral must be a function handle rather than an expression. Anonymous function is acceptable for this purpose.

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by