how to remove all the elements of an array in matlab code example Example: how to remove certain value from a array in matlab S(S == -120) = [];