How to draw a graph for function with constraints?

70 visualizaciones (últimos 30 días)
Trang To
Trang To el 1 de Jul. de 2020
Comentada: Trang To el 2 de Jul. de 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 ?

Respuesta aceptada

Matt J
Matt J el 1 de Jul. de 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

Más respuestas (1)

Gurpreet Singh
Gurpreet Singh el 1 de Jul. de 2020

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by