【问题标题】:Mathematica: How to evaluate this function?Mathematica:如何评估这个函数?
【发布时间】:2020-09-23 19:12:06
【问题描述】:

我需要在 2D 中评估一个函数,但它有三个未知数,两个参数 (x, y) 和 alpha。我需要在 {0,100} 之间评估 x 和 y,而在 {0,1} 之间评估 alpha。 函数为:f(x, y) = x ^ (a) * y ^ (1-a) 谢谢!

【问题讨论】:

    标签: wolfram-mathematica evaluate mathematica-8


    【解决方案1】:

    不确定“在 2D 中评估函数”是什么意思。一些选项

    f[x_, y_, a_] := x^a y^(1 - a)
    

    a的不同值生成图

    Table[Plot3D[f[x, y, a], {x, 0, 100}, {y, 0, 100}, 
            PlotLabel -> "a = " <> ToString@a], {a, 0, 1, .1}] //
      Partition[#, UpTo[4]] & //
      Grid
    

    生成轮廓

    ContourPlot3D[f[x, y, a], {x, 0, 100}, {y, 0, 100}, {a, 0, 1}, Contours -> 5]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多