"Contour not rendered for non-finite ZData" warning, working fine on Mathematica?

32 visualizaciones (últimos 30 días)
Hello,
I am trying to exectute this script:
[x,y] = meshgrid(-5:0.25:5);
z = (x.^2 + y.^4)/sqrt(4.*x.^2 + 4.*y.^2);
contour3(z)
It's working just fine in wolfram mathematica:
h := (x^2 + y^4)/Sqrt[4*x^2 + 4*y^2]
Plot3D[g, {x, -5, 5}, {y, -5, 5}]
How can I get it to work?

Respuesta aceptada

KSSV
KSSV el 8 de Jul. de 2019
Editada: KSSV el 8 de Jul. de 2019
[x,y] = meshgrid(-5:0.25:5);
z = (x.^2 + y.^4)./sqrt(4.*x.^2 + 4.*y.^2);
contour3(x,y,z)
YOu forgot to put ./ (element by element division) between numerator and denominator.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by