Say suppose I have a vector
X = [4 5 1 7 3 9 2 4]
and I want to access X but without indices: 1, 4 and 6. I tried
X(~[1, 4, 6])
But that's not working. Any suggestions.
Thanks
PS: I don't want to modify the vector.
indexindexingvector
X = [4 5 1 7 3 9 2 4]
X(~[1, 4, 6])
Best Answer