سؤال

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)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top