Delete rows from a matrix

Hi, I want to delete 1:5 and 10:15 rows from a given 15*1 matrix. How can I do this ?

 Risposta accettata

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

2 Commenti

Thank You.
Ameer Hamza
Ameer Hamza il 25 Mar 2020
Glad to be of help.

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

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

Start Hunting!

Translated by