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

19 次查看(过去 30 天)
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?

采纳的回答

KSSV
KSSV 2019-7-8
编辑:KSSV 2019-7-8
[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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by