My question is very similar to this one but I can\'t manage exactly how to apply that answer to my problem.
I am looping through a vector with a variable k
k
%create a logic vector of same size: l=ones(size(vector))==1; l(k)=false; vector(l);