How to remove unwanted elements of a array

58 visualizaciones (últimos 30 días)
Donald
Donald el 14 de Oct. de 2015
Comentada: Hyunjung Lee el 21 de Abr. de 2021
I have two arrays with unwanted data at the beginning and end of each array (Stress and del L). What is an easy way to remove these elements?

Respuestas (1)

WAT
WAT el 14 de Oct. de 2015
Editada: WAT el 14 de Oct. de 2015
If you want to get rid of indices 1 through 3 (for example) then
array(1:3) = [];
  1 comentario
Hyunjung Lee
Hyunjung Lee el 21 de Abr. de 2021
Thank you! I am not the original poster, but this helped me with removing array elements specified in an index vector. Before looking at your reply, I tried a(~idx,:) to try to only keep rows other than those specified by an index vector idx, but it didn't work. Thanks again!

Iniciar sesión para comentar.

Categorías

Más información sobre Structures en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by