在Mathematica中评估给定点的系统

cMi*_*nor 3 wolfram-mathematica

我有

f1[x_, y_] := x^2 - 10 x + y^2 + 8;
f2[x_, y_] := x*y^2  + x - 10 y + 8;
f[x_, y_] := {f1[x, y], f2[x, y]} ;
x0 = {0, 0};
Run Code Online (Sandbox Code Playgroud)

我要评估f[x_, y_]x0,所以f[0, 0]

我这样做但不起作用,正确的方法是什么?

MatrixForm[f[{x0}]]
Run Code Online (Sandbox Code Playgroud)

我明白了 f[{{0, 0}}]

但要{8, 8}改为

Sjo*_*ies 12

In[61]:= f @@ x0

Out[61]= {8, 8}
Run Code Online (Sandbox Code Playgroud)

什么地方出了错?当您评估f[{x0}]此等于时f[{{0,0}}],它与定义的模式不匹配f.f@@x0,这是简写的Apply[f,x0]替换x0的头部(内部等于List[0,0],因此它的头部是List),用f.然后你得到f[0,0]哪个匹配参数模式f.然后,您将获得正确的结果.