I'm having the following error and I don't understand how to get around it. This error is on Matlab's function median when using isoutlier. My MATLAB's version is 2018b.
% Error message shown in Command Window
Error using medianToo many input arguments.Error in locateoutliers (line 108) center = median(a,1,'omitnan');Error in isoutlier (line 144) [tf, lthresh, uthresh, center] = locateoutliers(a, method, ...
I've been using this code for some time now and just recently I've been having this error. I've tried with the same data that worked before and I still obtain the same message now.
My code is basically organized in the following way:
% Data to analyze (may contain NaN)
rr = Peaks.r; % 1x900 double
% Find Outliers
out = isoutlier(rr);
When I open the line on MATLAB's intrinsic function:
% Where the error happens.
% This is MATLAB's function (obviously NOT written by me)
case 'median' madfactor = -1 /(sqrt(2)*erfcinv(3/2)); %~1.4826
center = median(a,1,'omitnan'); amad = madfactor*median(abs(a - center), 1, 'omitnan'); lowerbound = center - p*amad; upperbound = center + p*amad;
As I said earlier, the exact same code used to work. It's an error that is happening on MATLAB's function, so I don't know how to solve this.
I'm also havign a very similar problem with MATLAB's function normalize, and the error is on the function sum.
I didn't overwrite any function.
What can I do to fix this?
Best Answer