x = linspace(-2, 3, 501); y = x.^2 - 1; ind = find(y>2); plot(x(ind), y(ind));