How can I add my own PDF ((Probability Distribution Function) in MATLAB?

Actually, I have my own PDF based on real observations (x=data; y=percentages) and I want to calculate moments, CDF and cumulents. Thus, my objective is to make Matlab consider my function as a PDF, although, 'pdf' command in Matlab requires a common distribution to deal with it, it doesn't work with a given PDF. So, I don't know how to proceed. If you can help me, I'll be extremely grateful.

1 commentaire

why not code your own PDF in an m-file, and then name it "pdf2.m", and then all the logic that you need to implement. Then make sure that your function is in the present working directory of Matlab; or you can just copy your function to the path returned by the command
tpath = fullfile(matlabroot,'toolbox','local')
then restart Matlab or issue the command
rehash toolboxreset
on the command window.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Fortran with MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by