Transpose u
pdesurf(mesh.p, mesh.t, u')
题
I run
pdesurf(mesh.p, mesh.t, u)
I got
Error using pdesurf (line 25)
Illegal solution format.
解决方案 2
Transpose u
pdesurf(mesh.p, mesh.t, u')
其他提示
PDESURF
expects input of the form pdesurf(p,t,u)
. u
must either be a column vector and the same length as p
, or a row vector and the same length as t
. I don't know how big your mesh.p
and mesh.t
variables are, so I can't say for sure, but it could be because you need to transpose your vector. It is possible that the error might be corrected by changing your code to
pdesurf(mesh.p, mesh.t, ufun(0:0.01:1,0:0.01:1)') % Note the transpose
If this doesn't work, then you need to make sure that either
size(t,2)==size(u,2)
or
size(p,2)==size(u,1)