matrix=load('Data');x=matrix(:,1);y=matrix(:,2);if x>0 & y>0 matrix(:,3)=1elseif x<0 & y>0 matrix(:,3)=2elseif x<0 & y<0 matrix(:,3)=3elseif x>0 & y<0 matrix(:,3)=4elseif x<-128 & y<-128 & x>128 & y>128'Invalid Values'end
With this code, I'm trying to put separate points into a matrix. However, my code doesn't do anything with the values as far as I have seen. I was trying to put the quadrant values into a third column so that I could code the script to count all points in each quadrant, so there is a reason for it. If you have any suggestions I would greatly appreciate it.
Best Answer