How to generate a joint probability matrix from a data matrix, Part 2

3 views (last 30 days)
To follow up, suppose I now want to create bins:
Suppose the input is
*bin center = (0.5 1 1.5)
*bin edge = (0.25 0.75 1.25)
*data matrix =
X Y
0.7 1
1 0.3
Then the output will be
X Y Prob
0.5 0.5 0
0.5 1 0.5
0.5 1.5 0
1 0.5 0.5
1 1 0

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!