Gy and Gx are distributions. What does it mean to take the product of Gy with some expression, and then try to equate that to a number? (In terms of mathematics: Nothing.) There are other points of confusion in what you have written.
So this is not an error that can be simply solved by us, only by you, in deciding what you meant by those equations. Once you are able to write down a valid expression in terms of mathematics, only then can you formulate a solution in MATLAB.
