Use fsolve with an elliptic integral
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I need to solve a non-linear equation with an eliptic integral in it. I tried to used fsolve but it don't want to work, any ideas. I copy the code below:
NI = 6.749914199660242e+05;
NI_ol = 1.749914199660242e+05;
Muo = 4*pi*10^-7; % (T*m/A)
a = 0.2073;
y = 0.15;
% Bos_c = Muo*(NI-NI_ol)*(a^2)/((z(1)^2 + a^2)^(1.5));
% m = (4*a*y)/((a+y)^2+z(1)^2);
%
% [K, E]= ellipke(m);
% Be = 2*Muo*NI*a*((2*m)^0.5)*(a*m*E/(2-2*m) + y*K - y*(2-m)*E/(2-2*m))/(2*pi*(2*a*y)^(1.5));
F=@(z) [Muo*(NI-NI_ol)*(a^2)/((z(1)^2 + a^2)^(1.5))...
- 2*Muo*NI*a*((2*m)^0.5)*(a*m*E/(2-2*m) + y*K - y*(2-m)*E/(2-2*m))/(2*pi*(2*a*y)^(1.5));...
m - (4*a*y)/((a+y)^2+z(1)^2);
[K, E]== ellipke(m)];
z_c = [0; 1000];
opts = optimoptions(@fsolve,'Algorithm', 'levenberg-marquardt');
neff = fsolve(F,z_c,opts);
0 件のコメント
採用された回答
Matt J
2020 年 3 月 17 日
編集済み: Matt J
2020 年 3 月 17 日
It does not make sense to have a relational expression like,
[K, E]== ellipke(m)
as one of your equations, expecially one that doesn't depend on any of your unknowns, z(i). Also, z(2) is not used anywhere in the system of equations. In other words, you have multiple equations in a single unknown z(1), so the system is not likely to have a solution.
6 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!