How to delete 2nd 3rd 4th and 5th rows from a table

2 views (last 30 days)
Hey
I have a large table of 45000 rows (3 cols) and need to delete certain rows from it. Obviously I could do it manually but I would be here until next year doing so. This is an example of the data:
1
1.20000000000000
1.40000000000000
1.60000000000000
1.80000000000000
2
2.20000000000000
2.40000000000000
2.60000000000000
2.80000000000000
3
3.20000000000000
3.40000000000000
All I need to keep hold of are the round numbers.
How can this be done? Thank you

Accepted Answer

Walter Roberson
Walter Roberson on 24 Feb 2022
temp = YourTable{:,1};
mask = temp == round(temp);
NewTable = YourTable(mask,:);

More Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!