Delete rows with specific properites as following:
- Find rows that have a negative value in any element of the row and delete it.
- Check if the last element of the row is equal of bigger than 24 and delete it.
Ex:
Input = [ 2 2 3 4 5 6 7 8;
0 1 2 3 34 5 6 8 ;
-1 -5 -4 -5 -6 -5 -4 -8;
1 2 3 4 5 6 7 24];
Answer:
output = [ 2 2 3 4 5 6 7 8;
0 1 2 3 34 5 6 8 ];
If you like the problem, please like it :)
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers300
Suggested Problems
-
Determine whether a vector is monotonically increasing
22942 Solvers
-
Remove the two elements next to NaN value
703 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
2043 Solvers
-
508 Solvers
-
Double all elements in the array
2291 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!