Azzera filtri
Azzera filtri

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

19 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

KSSV
KSSV il 8 Lug 2019
Modificato: KSSV il 8 Lug 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.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by