I have a vector for example
a = [0 1 0 3]
I want to turn a into b which equals b = [1 3].
b = [1 3]
How do I perform this in gen
Why not just, a=a(~~a) or a(~a)=[]. It's equivalent to the other approaches but certainly less key strokes.
a=a(~~a)
a(~a)=[]