INTRO: I have a vector field table build of 4 columns: the first two columns are the x and y coordinates, respectively and the last two columns are the x and y components, respectively. For instance, I created this vector field table with the command lines below:
%********************** CREATE XY COORDINATES ***********************
xvector = 1:1:10;yvector = 1:1:10;numX = numel(xvector); numY = numel(yvector);yvector = repmat(yvector(:),numX,1);xvector = repmat(xvector ,numY,1);XY_C = [xvector(:) yvector];%********************** CREATE XY COMPONENTS ************************
a=(1:1:100);x=2*a';y=5*a';%************************ VECTOR_FIELD TABLE ****************************
V=[XY_C x y];%**************************************************************************
Thus, there are hundred pairs of coordinates and there is an associated x and y component for each pair.
GOAL:
Assume the vector field table is given from elsewhere but is similar as above.I want to build a new vector field table by excluding elements from the original table. To do so, I wrote the following lines:
%************************** EXCLUDE ELEMENTS ***************************
SKIP=2;V_SKIP=V(0+SKIP:SKIP:end,:);%**************************************************************************
RESULTS and PROBLEM: If you run the command lines above, you will see that the new vector field table has excluded elements only along the y-coordinate while the elements of the x-coordinates are all there.
INTENTION: I would appreciate if someone knows what I have to do to exclude the elements also along the x-coordinate. For the particular case above, the first 10 lines of the new table would be:
2 2 24 602 4 28 702 6 32 802 8 36 902 10 40 1004 2 64 1604 4 68 1704 6 72 1804 8 76 1904 10 80 200
Thank you a lot in advance for help
Emerson
Best Answer