how to find the minimum value of the function of two variables with contour plot?
7 ビュー (過去 30 日間)
古いコメントを表示
How to find minimum value of the function below? I was able to make the contour plot but unable to get the min value using the fminsearch. It kept giving error message when I tried to get the min value. Below is the function and the contour I tried:
x = linspace(0.5,6);
y = linspace(0.5,6);
[X,Y] = ndgrid(x,y);
Q2 = 4.74/4*(3*exp(-2.054*(X-1.401))-2*exp(-1.027*(X-1.401)));
Q1 = 4.74/4*(3*exp(-2.054*(Y-1.401))-2*exp(-1.027*(Y-1.401)));
Q3 = 4.74/4*(3*exp(-2.054*(X+Y-1.401))-2*exp(-1.027*(X+Y-1.401)));
J2 = 4.74/4*(-exp(-2.054*(X-1.401))+6*exp(-1.027*(X-1.401)));
J1 = 4.74/4*(-exp(-2.054*(Y-1.401))+6*exp(-1.027*(Y-1.401)));
J3 = 4.74/4*(-exp(-2.054*(X+Y-1.401))+6*exp(-1.027*(X+Y-1.401)));
Z = 0.904.*(Q1+Q2+Q3-(sqrt(0.5.*((J2-J1).^2+(J1-J3).^2+(J3-J2).^2))));
contour(X,Y,Z,100,'black');
5 件のコメント
Walter Roberson
2019 年 3 月 21 日
fminsearch() is enough to get this result. The exact solution is X =
-(1000*ln(3))/1027 - (1000*ln(5))/1027 + (1000*ln((7*exp(1438827/1000000) + 4)*(343*exp(4316481/1000000) + 588*exp(1438827/500000) + 30*exp(1438827/2000000)*sqrt(343*exp(4316481/1000000) + 588*exp(1438827/500000) + 1011*exp(1438827/1000000) + 64)*sqrt(3) + 1686*exp(1438827/1000000) + 64)^(1/3) + 49*exp(1438827/500000) + 56*exp(1438827/1000000) + (343*exp(4316481/1000000) + 588*exp(1438827/500000) + 30*exp(1438827/2000000)*sqrt(343*exp(4316481/1000000) + 588*exp(1438827/500000) + 1011*exp(1438827/1000000) + 64)*sqrt(3) + 1686*exp(1438827/1000000) + 64)^(2/3) + 16))/1027 - (1000*ln(343*exp(4316481/1000000) + 588*exp(1438827/500000) + 30*exp(1438827/2000000)*sqrt(343*exp(4316481/1000000) + 588*exp(1438827/500000) + 1011*exp(1438827/1000000) + 64)*sqrt(3) + 1686*exp(1438827/1000000) + 64))/3081
which I found with Maple.
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!