In MATLAB say I have an array, and have created a logical vector that has true
entries for elements that I want to remove, call it del_index
for example. To accomplish this, is one of the following ways better/faster and/or preferable?
arr(del_index) = [];
OR
arr = arr(~del_index);