How to include contratins on 1 variables for this nonlinear system of equations?

1 次查看(过去 30 天)
I am trying to solve a nonlinear system of 3 equations for which i need to include contraints for 1 variables x(2), where:
1/4 less or equal than x(2), and also x(2) less than 1/3
I have the following code:
function S = myfun(x)
%betai = x(1)
%a = x(2)
%aprime = x(3)
S=[((2.1123 * cos(x(1)))/(8 * pi * (sin(x(1))^2)) * (1 + 0.0163 * tan(x(1))) - x(2)/(1-x(2)));
(2.1123 /(8 * pi * cos(x(1)))) * (1 - 0.0163 * cot(x(1))) - (x(3)/(1+x(3)));
tan(x(1)) - (1-x(2))/(1.4 * (1+x(3)))];
end
d0 = [23.69, 0, 0];
solution = fsolve(@myfun, d0)
And I get this solution: (which is not the one I need)
solution =
25.1041 0.9904 0.1542

回答(1 个)

Alex Sha
Alex Sha 2021-3-26
Hi, refer to the solutions below:
1:
x1: 0.415757622422666
x2: 0.321911265108838
x3: 0.0970690621849188
2:
x1: 12.9821282367818
x2: 0.321911265108838
x3: 0.097069062184919
3:
x1: 19.2653135439614
x2: 0.321911265108837
x3: 0.0970690621849187
Multi-values for x1

类别

Help CenterFile Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by