Clear Filters
Clear Filters

Delete rows from a matrix

2 views (last 30 days)
Eranja Noopehewa
Eranja Noopehewa on 25 Mar 2020
Commented: Ameer Hamza on 25 Mar 2020
Hi, I want to delete 1:5 and 10:15 rows from a given 15*1 matrix. How can I do this ?

Accepted Answer

Ameer Hamza
Ameer Hamza on 25 Mar 2020
Edited: Ameer Hamza on 25 Mar 2020
Something like this
x = (1:15)';
x([1:5 10:15], :) = [];

More Answers (0)

Categories

Find more on Multidimensional Arrays 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!