You can replace the outliers of co2_clean with NaNs using the following approach:
co2_clean data.(Q1 - 1.5*IQR) and (Q3 + 1.5*IQR), where Q1 and Q3 are the first and third quartiles of the co2_clean data, respectively.co2_clean that are outside the bounds with NaNs, using the logical indexing.Here's the code:
main.m182 chars6 lines
This will replace the outliers in co2_clean with NaN.
gistlibby LogSnag