How do I remove elements at a set of indices in a vector in MATLAB?

 ̄綄美尐妖づ 提交于 2019-11-27 03:44:59

问题


I have a vector with 100 elements. I have another vector with index positions of elements I want to remove from this vector.

How do I do this?


回答1:


vector(indecies) = []

example:

>> a = 1:10;
>> a([3,4,7]) = []

a =

     1     2     5     6     8     9    10


来源:https://stackoverflow.com/questions/3789847/how-do-i-remove-elements-at-a-set-of-indices-in-a-vector-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!