MATLAB: How to find all points inside a ellipse

MATLAB

I have the bounds of an ellipse in x- and y-coordinates. My end goal is to get a matrix of all x-values and a corresponding matrix of all y-values for the points in/out that ellipse. If possible, I would also like to color in the specified ellipse on a 2d plot. Does anyone know which commands/functions I can use to do this? Most of what I have seen simply confirms whether input values lie in/out an ellipse. Thank you!
such that a sample of the ellipse is represented as :
xCenter = 15;
yCenter = 10;
xRadius = 1.5;
yRadius = 80;
theta = 0 : 0.01 : 2*pi;
x = xRadius * cos(theta) + xCenter;
y = yRadius * sin(theta) + yCenter;
plot(x, y, 'LineWidth', 3);

Best Answer

‘My end goal is to get a matrix of all x-values and a corresponding matrix of all y-values for the points in/out that ellipse.’
There would be an infinite number of them, since you have defined an infinite 2D space. Your computer (or any computer) likely cannot handle it.
‘If possible, I would also like to color in the specified ellipse on a 2d plot’
That’s more tractable. See the patch (link) and related functions (such as area and fill, linked to at the end of that page) to create your plot. Remember to specify axis equal to avoid distorting your ellipse plot.