{x(1),x(2)} is not valid syntax in MATLAB. To create an array that contains the values of x at indices 1 and 2, you can use square brackets like this:
main.m13 chars2 lines
This will create a 1x2 array containing the values of x(1) and x(2).
gistlibby LogSnag