MATLAB: Help with splitting data point pairs

MATLABquadrantsplit data points

So I was tasked with defining my x and y with x= rcos(theta) and y=rsin(theta). Both r and theta are data arrays. My next step is to do the following: Utilize conditional statement(s) in order to split data point pairs into separate arrays depending on which quadrant they would fall into if plotted “y versus x”
I am unsure exactly what this is asking me to do and unsure how to go about it. Thank you!

Best Answer

BaconSwordfish. After many hours I finally got it. You need two new counters in a for loop with an if end statement like so assuming you already have x and y saved into arrays.
for l=1:length(x)
if x(l)>0
xQ14=x(x>0); %x is positive in quadrants 1 & 4
end
if x(l)<0
xQ23=x(x<0);
end
end