solving set of non linear equation

4 views (last 30 days)
Shubham
Shubham on 1 Feb 2021
Edited: Shubham on 2 Feb 2021
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

Answers (2)

David Hill
David Hill on 1 Feb 2021
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 Comment
Shubham
Shubham on 1 Feb 2021
sorry but this is incorrect , I want to solve the non linear eqn

Sign in to comment.


Alex Sha
Alex Sha on 2 Feb 2021
Hi, refer to the results below:
phi1: 0.00687835881390378
phi2: 3.07608732711163

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!