How to take values after a specific point and discard values before it, in MATLAB?

Here's one way: >> p = 9; >> startrow = find(A(:, 3) == p, 1); % first row where 3rd column entry is p >> A1 = A(startrow:end, :) A1 = 7 8 9 2 3 4 3 4 5 1 6 8 Edit: With multiple entries of p in the last column, you can vary how find is used. For example, if you want to start at the last p instead of the first, you could run >> startrow = find(A(:, 3) == p, 1, 'last'); % last row where 3rd column entry is p If you want the second from first, you'd need a little more work: >> startrows = find(A(:, 3) == p, 2); % first two rows where 3rd column entry is p >> startrow = startrows(end); % Just the second row where 3rd column entry is p Also, you probably need error checking if there is the possibility that p never appears in the array, or doesn't appear at least two times (for the last example).

– chee Oct 25 '10 at 17:21 A1 = A(1:startrow, :); – SCFrench Oct 25 '10 at 18:30.

If you know what column the point is from you can simply do B = A(n:end,:) where n is the column number.

Another option is to delete the rows directly from the original matrix: A(1:startrow-1,:)=.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions