what is its code in MATLAB?
Neeta Dsouza answered .
2025-11-20
If you have the Statistics and Machine Learning Toolbox -- Inverse Gaussian Distribution.
For example,
pd = makedist('InverseGaussian');
x = 0:0.1:5;
y = pd.pdf(x)
figure; plot(x,y,'.')

returns the probability density function (pdf) of the standard normal distribution, evaluated at the values in y = normpdf(x)x.
For example
Compute the pdf values for the standard normal distribution at the values in x.
x = [-2,-1,0,1,2]; y = normpdf(x)
y = 1×5
0.0540 0.2420 0.3989 0.2420 0.0540