Solving nonlinear equations numerically with fsolve

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Calculus 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by