• 大小: 222KB
    文件类型: .m
    金币: 2
    下载: 1 次
    发布日期: 2021-06-05
  • 语言: Matlab
  • 标签: matlab  随机数  zipf  

资源简介

该文件中包含了多种随机数的产生,其中的zipf分布是自己所写,很不错的一个m文件。

资源截图

代码片段和文件信息

function varargout = randraw(distribName distribParams varargin)
%
%   EFFICIENT RANDOM VARIATES GENERATOR

% See alphabetical list of the supported distributions below (over 50 distributions)

% 1)  randraw 
%           presents general help.
% 2)  randraw( distribName ) 
%           presents help for the specific distribution defined 
%           by usage string distribName (see table below).
% 3)  Y = randraw( distribName distribParams sampleSize );
%           returns array Y of size = sampleSize of random variates from distribName  
%           distribution with parameters distribParams
%
%               ALPHABETICAL LIST OF THE SUPPORTED DISTRIBUTIONS:
%  ____________________________________________________________________
% |      DISTRIBUTION NAME                    |   USAGE STRING         |
% |___________________________________________|________________________|
% |        Alpha                              |    ‘alpha‘             |
% |        Anglit                             |    ‘anglit‘            |
% |        Antilognormal                      |    ‘lognorm‘           |
% |        Arcsin                             |    ‘arcsin‘            |
% |        Bernoulli                          |    ‘bern‘              |
% |        Bessel                             |    ‘bessel‘            |
% |        Beta                               |    ‘beta‘              |
% |        Binomial                           |    ‘binom‘             |
% |        Bradford                           |    ‘bradford‘          |
% |        Burr                               |    ‘burr‘              |
% |        Cauchy                             |    ‘cauchy‘            |
% |        Chi                                |    ‘chi‘               |
% |        Chi-Square (Non-Central)           |    ‘chisqnc‘           |
% |        Chi-Square (Central)               |    ‘chisq‘             |
% |        Cobb-Douglas                       |    ‘lognorm‘           |
% |        Cosine                             |    ‘cosine‘            |
% |        Double-Exponential                 |    ‘laplace‘           |
% |        Erlang                             |    ‘erlang‘            |
% |        Exponential                        |    ‘exp‘               |
% |        Extreme-Value                      |    ‘extrval‘           |
% |        F (Central)                        |    ‘f‘                 |
% |        F (Non-Central)                    |    ‘fnc‘               |
% |        Fisher-Tippett                     |    ‘extrval‘           |
% |        Fisk                               |    ‘fisk‘              |
% |        Frechet                            |    ‘frechet‘           |
% |        Furry                              |    ‘furry‘             |
% |        Gamma                              |    ‘gamma‘             |
% |        Generalized Inverse Gaussian       |    ‘gig‘               |
% |        Gener

评论

共有 条评论