Wolfram mathematica Mathematica中绘制插值

Wolfram mathematica Mathematica中绘制插值,wolfram-mathematica,Wolfram Mathematica,这显然很简单,但我找不到我的错误。情节一点也没有给我分 tmax = 1.; nmax = 10; deltat = tmax/nmax; h[t_, s_] := t^2 + s^2; T = Table[{{n*deltat}, {n*deltat}, h[n*deltat, n*deltat]}, {n, 0, nmax}] inth = ListInterpolation[T] Plot3D[inth[s, t], {s, 0, 1}, {t, 0, 1}] 欢迎任何帮助 Marco我

这显然很简单,但我找不到我的错误。情节一点也没有给我分

tmax = 1.;
nmax = 10;
deltat = tmax/nmax;
h[t_, s_] := t^2 + s^2;
T = Table[{{n*deltat}, {n*deltat}, h[n*deltat, n*deltat]}, {n, 0, nmax}]
inth = ListInterpolation[T]
Plot3D[inth[s, t], {s, 0, 1}, {t, 0, 1}]
欢迎任何帮助

Marco

我认为您的“T”应该是一个3D点列表,在这种情况下,您应该使用以下内容生成它:

tmax = 1.;
nmax = 10;
deltat = tmax/nmax;
h[t_, s_] := t^2 + s^2;
T = Table[{n*deltat, n*deltat, h[n*deltat, n*deltat]}, {n, 0, nmax}]
inth = ListInterpolation[T]
Plot3D[inth[s, t], {s, 0, 1}, {t, 0, 1}]
现在T[[1]]={0,0,0.},而不是像以前那样{{0.},{0.},0.}