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 Center および File ExchangeSolver 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