urgent question regarding hist3

4 次查看(过去 30 天)
Hello, I want to plot a 3d histogram in Matlab (hist3 command) with a set of coordinates x,y&z in which each point of x&y has a different value of z. The problem is I have no idea how I should define the value of "z". I would be grateful if someone could help me. Thanks.

采纳的回答

Image Analyst
Image Analyst 2014-12-25
hist3() is in the Statistics Toolbox. http://www.mathworks.com/help/stats/hist3.html
There are examples for it. I don't have that toolbox but the help seems to indicate that you give it a list of value pairs in an M-rows by 2-columns matrix. It then counts up the number of times each pair occurs and plots the counts in a "3D"-ish bar chart. So what kind of data do you have? Do you have a list of M-rows by 3-columns, where each column is x, y, or z? If so, what "thing" would you want the function to count? The number of times each x,y,z triplet occurs? What are the x,y,z values anyway? Are they spatial locations where some kind of "event" happened, like a proton emission in a PET scanner or something?
  4 个评论
RSM
RSM 2014-12-25
I really appreciate. Yes you are right. But I want bar chart. I mean for each point (x,y), intensity (z) should be shown by a bar. probably with using hist3 or bar3.
Image Analyst
Image Analyst 2014-12-25
OK. Then use bar3() instead of surf().

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by