Solving nonlinear equations numerically with fsolve

조회 수: 5 (최근 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 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