In Octave or Matlab, some times one needs to eliminate certain elements in an array.
For example, if
and suppose I want to create a matrix “b” such that it has all the elements of “a” except 20 and 40. This can be achieved by:
The result is:
10 30 50 60