MATLAB: Discrete joint probability distribution

bivariatediscretejoint probability distributionMATLAB

Hi
I want to build the discrete joint probability distribution for two set of data. data are two groups of random numbers (wind speed) and (wind direction degree). the final results must be like table below.
Pij in the Table are numbers (probability values).
Which function should I use to do this?

Best Answer

You need to compute the histogram count for every pair (theta_i, v_j), and then normalize it by the sample size. Thus, histcounts2 will help.
Related Question