How to plot three-dimensional histograms

1 view (last 30 days)
I am interested in plotting a three dimensional histogram. I have two vectors of data, which I use to create a grid, say on the x-y plane, and I would like to assign a numerical value (all of them stored in a matrix) to each bin of the grid (not necessarily an integer) and plot those values along the z-axis, each value of the matrix over its corresponding bin. Is there any function that would allow this, given the two vectors to generate the grid and the matrix of the data to be plotted over it? Thank you.

Answers (1)

computingscience123
computingscience123 on 16 Jul 2014
I would like to clarify one thing that I think was not very clear in my question: the vectors used to create the grid should contain in principle the x and y coordinates of the centres of each bin. They could also be the coordinates of the vertices of the bins instead, if necessary.
Thanks again.

Products

Community Treasure Hunt

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

Start Hunting!