Sounds like a nice homework problem.
You'll probably want to use logical indexing to find the indices of the Y data that are within some range of your predicted y curve.
If you wanted to find the indices of all Y values that are greater than 3 and less than 5, you'd do
which would return true for all of the y values that are within that range.
Now try the same logic, but find the indices of all Y points that are greater than 0.98 of your x^2 curve, and less than 1.02.