Pregunta

I run

pdesurf(mesh.p, mesh.t, u)

I got

Error using pdesurf (line 25)
Illegal solution format.
¿Fue útil?

Solución 2

Transpose u

pdesurf(mesh.p, mesh.t, u')

Otros consejos

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)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top