⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 emplot.m

📁 极值理论中各种函数及图像的程序。matlab实现。
💻 M
字号:
function c=emplot(data,axs),
%Plots empirical distribution of a sample.
%
%USAGE: emplot(data,axs)
%
% data: Data vector
%  axs: Can be 'lin', 'x' or not entered
%          if not entered: Log scaling on both axes
%          if 'lin': Linear scaling on both axes
%          if 'x': Log scaling on x axis
warning off

if nargin==1,
   axs='both';
end

if strcmp(axs,'both')|strcmp(axs,'x'),
   disp(' If there are negative values in the data, they will be omitted while taking logarithm');
   
end

data=sort(data);
ypoints=1-ppoints(data);
if strcmp(axs,'lin'),
    plot(data,ypoints,'.');
    
    xlabel('x');
    ylabel('1-F(x)');
   
    
elseif strcmp(axs,'x')
    semilogx(data,ypoints,'.')
    set(gca,'xticklabel',get(gca,'xtick'));
    set(gca,'xtickmode','manual');                        
    xlabel('x (on log scale)');

    xlabel('x (on log scale)');
    ylabel('1-F(x)');
    
elseif strcmp(axs,'both')
    loglog(data,ypoints,'.')
    set(gca,'yticklabel',get(gca,'ytick'));
    set(gca,'ytickmode','manual');                        
    set(gca,'xticklabel',get(gca,'xtick'));
    set(gca,'xtickmode','manual');                        
    xlabel('x (on log scale)');
    ylabel('1-F(x) (on log scale)');
    
else
    disp('ERROR: Second input should be one of {''lin'',''x'',''both''} ')
    return
 end
 set(gca,'fontsize',8);
 
 warning on

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -