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)
Show older comments
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
Answers (1)
Jan
on 18 Jun 2017
Perhaps:
Data = rand(1000, 3);
toDelete = Data(:, 3) > Data(1, 3);
Data(toDelete, :) = [];
0 Comments
See Also
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!