solving set of non linear equation

조회 수: 3 (최근 30일)
Shubham
Shubham 2021년 2월 1일
편집: Shubham 2021년 2월 2일
Problem : to find the values of phi(1) and phi(2) by solving the non linear set of eqn ......I am getting error
PS : half of the unknowns in nle are given and rest two are obtained before using fsolve

답변 (2개)

David Hill
David Hill 2021년 2월 1일
function F = root2d(phi)
beta_a = 10;
alpha_n = 10 ;
eta = 18;
i = 18;
theta_i = asind(sind(beta_a)*sind(eta));
theta_n = atand(tand(beta_a)*cosd(eta))- alpha_n;
F(1) = (pi*sin((pi*(phi(1) + theta_n))/180)*cos((pi*phi(2))/180)*(cos((pi*theta_n)/180) + tan((pi*i)/180)*tan((pi*theta_i)/180)))/(180*sin((pi*phi(1))/180)*(cos((pi*(phi(1) + theta_n))/180)*cos((phi(2)*pi)/180) + sin((phi(2)*pi)/180)*tan((theta_i*pi)/180))^2) - (pi*sin((pi*theta_n)/180))/(180*sin((pi*phi(1))/180)*(cos((pi*(phi(1) + theta_n))/180)*cos((pi*phi(2))/180) + sin((pi*phi(2))/180)*tan((pi*theta_i)/180)));
F(2) = ((cos((pi*theta_n)/180) + tan((pi*i)/180)*tan((pi*theta_i)/180))*((pi*cos((pi*(phi(1) + theta_n))/180)*sin((pi*phi(2))/180))/180 - (pi*cos((pi*phi(2))/180)*tan((pi*theta_i)/180))/180))/(sin((pi*phi(1))/180)*(cos((pi*(phi(1) + theta_n))/180)*cos((phi(2)*pi)/180) + sin((phi(2)*pi)/180)*tan((theta_i*pi)/180))^2);
end
Then run script
phi=[1 1];
F=root2d(phi);
  댓글 수: 1
Shubham
Shubham 2021년 2월 1일
sorry but this is incorrect , I want to solve the non linear eqn

댓글을 달려면 로그인하십시오.


Alex Sha
Alex Sha 2021년 2월 2일
Hi, refer to the results below:
phi1: 0.00687835881390378
phi2: 3.07608732711163

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by