To remove data above 1.2 and below -1.2.
I use the following function:
threshold = [-1.2, 1.2];
y = rmoutliers(y,'percentiles',threshold);
But error occurred:
Error using isoutlier>parseinput (line 236) 'Percentiles' value must be a sorted 2-element numeric vector with entries between 0 and 100.
Any other functions which can be used to solve the problem?