How to draw a graph for function with constraints?

41 ビュー (過去 30 日間)
Trang To
Trang To 2020 年 7 月 1 日
コメント済み: Trang To 2020 年 7 月 2 日
How can I draw the contour plot of the function z = 3x + 4y and the constraint curve x^2 + 4xy +5y^2 = 10 in the same figure ?

採用された回答

Matt J
Matt J 2020 年 7 月 1 日
fimplicit(@(x,y) x.^2 + 4*x.*y +5*y.^2 - 10,'r'); hold on; fcontour(@(x,y) 3*x+4*y) ; hold off
  1 件のコメント
Trang To
Trang To 2020 年 7 月 2 日
thank you so much

サインインしてコメントする。

その他の回答 (1 件)

Gurpreet Singh
Gurpreet Singh 2020 年 7 月 1 日

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by