meplot.m
来自「极值理论中各种函数及图像的程序。matlab实现。」· M 代码 · 共 28 行
M
28 行
function [sme,out]=meplot(data,omit),
%Plots sample mean excesses over increasing thresholds
%
%USAGE: [sme,out]=meplot(data,omit)
%
% data: Data vector
% omit: Number of largest values to be omitted. Default is 3.
%
% out: Increasing thresholds vector for reproducing the plot (x-axis data).
% sme: Sample mean excesses over thresholds for reproducing the plot (y-axis data).
%
warning off
if nargin==1,
omit=3;
end
out=sort(data);
n=length(out);
for i=1:n;
sme(i)=mean(data(data>out(i)))-out(i);
end
out=out(1:end-omit);
sme=sme(1:end-omit)';
plot(out,sme,'.')
xlabel('Threshold');
ylabel('Mean Excess');
warning on
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?