how can i re-order rows in matrix by deleting un-desired rows by applying the condition to specific column ?

2 views (last 30 days)
Hey i have matrix of 3 columns and un-marked m numbers of rows i need to re-arrange these rows according to value of third column and this is the condition i need to apply 1- first values of third column is the biggest value and i need all values comes after that to be equal or less than the first value of the rows if the next value of third column is bigger than which before it then delete row how can i do it thanks Tarek
  2 Comments
dpb
dpb on 18 Jun 2017
Whew!!! That was a mouthful. Show us a (small) example input and desired output and maybe we can correlate the two...

Sign in to comment.

Answers (1)

Jan
Jan on 18 Jun 2017
Perhaps:
Data = rand(1000, 3);
toDelete = Data(:, 3) > Data(1, 3);
Data(toDelete, :) = [];

Categories

Find more on Dynamic System Models in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!