Hi,
I noticed that the dimensions of arrays being multiplied does not match. According to the code provided, the term cos(n*pi*Y/6) yields symbolic array of dimension 101 x 101 and the term sin(n*pi*X/6) yields symbolic array of dimension 61 x 61. You can ensure that the dimensions of X and Y are compatible for multiplication. Also, you can try appending ones to make dimensions consistent if you are using element wise multiplication instead of matrix multiplication.