如何绘制这个功能?

时间:2012-12-30 15:56:44

标签: wolfram-mathematica

我正在尝试在xy平面中绘制区域$x^{p}+y^{p}\le 1$。但是当我运行这样的命令时:

RegionPlot[x^0.7 + y^0.7 <= 1, {x, -500, 500}, {y, -500, 500}]

我总是遇到如下错误消息:

LessEqual::nord: Invalid comparison with -91.0952+125.382 I attempted. >>

我很困惑 - 如何让数学家知道我在R^{2}而不是C^{2}中寻找该地区?

3 个答案:

答案 0 :(得分:2)

这里无效的比较错误实际上不是问题。 RegionPlot []将绘制表达式求值为True的区域。表达式复杂的区域不会评估True,而regionplot会将它们留空。

您看到完全空白的情节的原因很简单,您的绝对范围太大。 RegionPlot默认使用粗网格,并且一起错过小的True区域。

这样可行(将无效比较作为警告)

RegionPlot[TrueQ[( x^0.7 + y^0.7 <= 1)], {x, -1, 1}, {y, -1, 1},
             PlotPoints -> 100]

enter image description here

你可以抑制警告:

Quiet[RegionPlot[TrueQ[( x^0.7 + y^0.7 <= 1)], {x, -1, 1}, {y, -1, 1},
             PlotPoints -> 100], {LessEqual::nord}]

答案 1 :(得分:1)

您的绘图范围无效。您正在计算(-500)^0.7,这是一个复数(-45.5509762 + 62.69554i是特定的)。

答案 2 :(得分:0)

RegionPlot[Table[x^i + y^i <= 1, {i,.1,1,.1}], {x,0,1}, {y,0,1}, Evaluated->True]

Mathematica graphics

相关问题