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

30 ビュー (過去 30 日間)
am
am 2019 年 7 月 8 日
コメント済み: am 2019 年 7 月 8 日
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 Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by