Chris suggests a nice trick. And attach your data like he says in his hidden comment (click link above to show it).
save('answers.mat', 'DataA', 'DataB');
Use the paperclip icon.
Another trick I've used when you have quantized data (multiple points with the same x value) is to add a very slight amount of noise to the x data. Add enough noise to make them unique and avoid the error polyfit throws, but not enough to change the formula it will find:
xNoisy = x + 0.00001 * (maxx - minx);
coefficients = polyfit(xNoisy, y, 2);
estimatedY = coefficients(3) * thisX .^2 + coefficients(2) * thisX + coefficients(1);
Note that this will give a different formula than Chris's because this will consider how many points are in the cluster, so more points in a cluster will influence the line more, while Chris's uses the centroids of the clusters which ignores how many points are in the cluster. If you have about the same number of points in each cluster, it won't make much of a difference, but if some clusters have wildly different number of points than other clusters, then it could make a noticeable difference.