Plot multivariable function, find critical points
古いコメントを表示
i need to plot a multivariable (x1,x2) function f_a in matlab, and find its critical points. I plotted it, but in order to find the critical points, i need to set the partial derivatives to zero then solve. when i try setting the partial derivatives to zero using diff(f_a,x1),it gives me an error.
[x1,x2] = meshgrid(-5:.2:5);
f_a = x1.^2 + x2.^2 +2.*x1.*x2;
figure(1)
surf(x1,x2,f_a)
fa1=diff(f_a,x1)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!