solving set of non linear equation

1 Ansicht (letzte 30 Tage)
Shubham
Shubham am 1 Feb. 2021
Bearbeitet: Shubham am 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

Antworten (2)

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

Melden Sie sich an, um zu kommentieren.


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

Kategorien

Mehr zu Particle & Nuclear Physics finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by