Filter löschen
Filter löschen

How to draw a graph for function with constraints?

22 Ansichten (letzte 30 Tage)
Trang To
Trang To am 1 Jul. 2020
Kommentiert: Trang To am 2 Jul. 2020
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 ?

Akzeptierte Antwort

Matt J
Matt J am 1 Jul. 2020
fimplicit(@(x,y) x.^2 + 4*x.*y +5*y.^2 - 10,'r'); hold on; fcontour(@(x,y) 3*x+4*y) ; hold off

Weitere Antworten (1)

Gurpreet Singh
Gurpreet Singh am 1 Jul. 2020

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by