MATLAB: Generating random number for the Inverse Gaussian distribution random number generatorstatistics what is the code for generating random number for the inverse Gaussian distribution? Please post here if anyone known of a good method of doing this. Best Answer If you have the Statistics and Machine Learning Toolbox, then you can generate N random numbers withN = 1000; % Set this to the number of values you wantmu = 1; % Set the scale parameterlambda = 1; % Set the shape parameterr = random('InverseGaussian',mu,lambda,N,1); Related SolutionsMATLAB: How to generate random number from a given Normal distribution There are several options. One is the core MATLAB function randn. The Statistics and Machine Learning Toolbox has the normrnd funciton, and others. MATLAB: Plotting the inverse Gaussian distribution pf=makedist('InverseGuaussian','mu',1,'lambda',1);%establish whatever you want for mu and lambdax=0:.001:2;%establish whatever values you want evaluatedy=pdf(pf,x);plot(x,y); Related QuestionGaussian DistributionRandom Numbers generation from pareto distibution and generalized exponential distrbutionHow to generate random numbers from a censured Weibull distribution in Statistics Toolbox 7.2 (R2009b)Gaussian distribution with randn
Best Answer