MATLAB: Computing CDF???

cdf

Hi all,
Does anyone of you know how to calculate cdf plot using following data sets:
A = [10 10 10 5 3 3 3 2 0]; B = [10 10 10 5 5 3 3 2 2 2 1 0]; how can obtain cdf from A and B?
Best Regards Talha

Best Answer

If you're using release R2014b or later (for histcounts and histogram) or release R2015b or later (for histcounts2 and histogram2) you can specify the 'Normalization' argument with value 'cdf' to display the CDF of the data that you binned using the appropriate function.
Note that this doesn't find parameters for a particular distribution that were determined by fitting the distribution to your data. If you want to do that, take a look at some of the functions on this page in the documentation for Statistics and Machine Learning Toolbox, specifically those whose names end in "fit".