Using is outlier with threshold
显示 更早的评论
I need to only plot the outliers that are out of my upper and lower limits. But I get a percentile error using TF= (A,'percentiles',threshold)
Below is my code and plot with out apply threshold to outlier.
XT{1} is a cell array of data.
%% Plot the control charts:
%For all the states (states 1, 3, 10, 12, 14), plot x(t), shown in blue in the hint below.
timev=zeros(1020,1);% initalize time vector
for i= 1:1020;
timev(i)= timev(i)+int*(8*(i)+30);
end
threshold=[LCL,UCL];
[TF]= isoutlier(XT{1},) %'percentiles',threshold)
%Create a new figure
figure('Renderer', 'painters', 'Position', [10 10 1200 900])
plot( timev, XT{1}, timev(TF),XT{1}(TF),'x')
hold on
%Plot the control limits CL, UCL, and LCL as horizontal lines in green. Remember that
%these limits are the same for all plots (calculated from state 1).
yline(CL,'g')% plot the control limits
yline(UCL,'g')% plot the upper control limits
yline(LCL,'g')% plot the lower control limits

采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

