Plotting contours of a function
1 次查看(过去 30 天)
显示 更早的评论
Dear expert.
I am just a beginner when it comes to using MATLAB. Would anybody be so kind and show me the rope of this particular problem? I would like to use this as the base for my further practice.
Let z = f(x, y) = 2x y − y 2 − 4x 2 + 3y.
Draw the contour plot of the function. Point out the local extreme and the saddle point on that figure.
I would like to express my gratitude to your concern!
4 个评论
madhan ravi
2020-6-18
编辑:madhan ravi
2020-6-18
Didn’t mean it personally, it was meant generally. Have a good day ;). Don’t be sorry because you didn’t do anything wrong.
采纳的回答
KSSV
2020-6-18
- Fix the limits of x and y. Use linspace for this. Read about linspace.
- Make x, Y to a grid using meshgrid. Read about this.
- Write your formula i.e f(x,y) interms of matrices X, Y. Read about element by element operations.
- Now you got f as a matrix, now you can use contourf.
- To find the local extreme use min. Read about this function.
Read about MATLAB basics. https://www.tutorialspoint.com/matlab/index.htm
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!