I need to do data fitting to find the distribution of a given data.
I need to find the pdf function of the distribution.
I can use data fitting functions in
Check out allfitdist in Matlab.
Alternatively, consider specialty packages such as ExpertFit or EasyFit. The JMP statistical software also has a fairly easy to use distribution fitting option. All of these will evaluate goodness-of-fit criteria such as Cramer-von Mises and log likelihood estimates.
Once you've picked the functional form of the distribution, parameter values are usually estimated by maximum likelihood estimators or method of moments.
If you're planning on using the results in a simulation of some sort, you might consider just bootstrapping your sample rather than distribution fitting. Yet another option if simulating would be to run a designed experiment where you vary the distribution choice and see if alternatives have a significant impact on your results before worrying too much about fitting just the right distribution.