Hi,
The 3rd argument(Z) to the surf function should be a matrix with atleast 2 rows and 2 columns.
In this line of code,
surf(r,x,imag(u))
imag(u) is 1x67 sym, hence you are getting the error.
For more information on the input arguments and surf function, refer to the documentation: surf