Respuestas (2)

madhan ravi
madhan ravi el 29 de Dic. de 2018
Editada: madhan ravi el 29 de Dic. de 2018

0 votos

Define the variables using syms x y and just plot the function with either of the below functions:
doc ezplot % 2D
doc ezsurf % 3D
Image Analyst
Image Analyst el 29 de Dic. de 2018
Editada: Image Analyst el 29 de Dic. de 2018

0 votos

Did you try surf()? If not, why not?
x = linspace(-10, 10, 1000);
y = linspace(-10, 10, 1000);
[X, Y] = meshgrid(x, y);
z = X .^ 2 + (Y - (X .^ 3/5)) .^ 2;
surf(x, y, z, 'EdgeColor', 'none')
colorbar
xlabel('x', 'FontSize', 15);
ylabel('y', 'FontSize', 15);
title('z = X ^ 2 + (Y - (X ^ (3/5))) ^ 2', 'FontSize', 15, 'Interpreter', 'none');
and here it is zoomed in to the -1 to +1 range:
0001 Screenshot.png

Categorías

Preguntada:

el 29 de Dic. de 2018

Editada:

el 29 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by