MATLAB: How declare for the matlab matrix that an value don’t is considerable ?

ignore value

How declare for the matlab matrix that an value don't is considerable?
I'm opening netcdf data and I want that the matlab ignore a specific value.
How do I?
Thanks! Carlos

Best Answer

  • You can remove elements from your matrix as follows:
    a = [1 2 3 4 5];
    % delete all two's:
    a(a==2) = [];
    Titus