Hi dear Steve,
I used the following code to find out and remove the outliers from my several data sets. I found the outliers and removed but while making the boxplot it still shows some outliers as circular symbols above or lower the data range in the boxplot. Would you please tell me why does this happen ?
close all; clear all; clc X = xlsread('CO-2009.xlsx'); mu = mean(X); sigma = std(X);
[n,p] = size(X); MeanMat = repmat(mu,n,1); SigmaMat = repmat(sigma,n,1); outliers = abs(X – MeanMat) > 3*SigmaMat; nout = sum(outliers); X(any(outliers,2),:) = []; boxplot(X) ylabel('CO (ppbv)') h=findobj(gca,'tag','Outliers'); set(h,'Marker','o'); title('BoxPlot for CO outliers in 2009') xlswrite('CO data without OLs_2009.xlsx',X)
Rahman
Best Answer