Ask Your Question

Revision history [back]

The problem comes from this line:

x=V[0];y=V[1]

If V is a matrix, then x and y become rows, not symbolic variables. In the next line x^2 triggers the error, since a row squared doesn't make sense. Simply Replace it with

x=V[0, 0]; y=V[1, 0]