How can I use the subplot, meshgrid, surf, and contour functions together?
Mostrar comentarios más antiguos
I need to create a script that uses the subplot, meshgrid, surf and contour functions to generate a 3D surface plot and a contour plot of the function z = (y + 5)^(2) + 1.5*x^(2) − x^(2)*y for −4 ≤ x ≤ 4 and −4 ≤ y ≤ 4 using a step size of 0.1.
Respuestas (1)
Walter Roberson
el 4 de Jul. de 2018
0 votos
These are all sounding like homework.
Follow the same setup I showed before for creating the x, y, z data with meshgrid. Then use surfc() instead of surf() and contour() independently.
Categorías
Más información sobre Contour Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!