Friday 15 April 2011

matlab - Histogram of lengths (or anything else physical) vs. counts -


I'm searching for a lot in matlab on the histogram option hist , but I do not really I get suiting

I have two columns of data (in total 100 data data):

  x: 0.0278 0.0556 0.0833 0.1111 0.1389 0.1667 0.1945 0.2222 y: 1 3 10 13 28 53 66 91 137 As you can see, X is growing at approximately 0.278 nm at a time (the length measured in XN). I want to plot a histogram where X is X-X (ranges from 0 nm to the extent of 2.7503 nm), and y means the length of each, i.e. on the y-axis  

I have tried hist (y, x) but it gives me totally nonsense (in the end, I know it's gaussian). I'm rather new to matlab, so maybe it's something easy to solve, sorry.

You already have a number stored in vector y , in fact your To count anything, you need hist to think that you are searching for a simple plot:

  bar (x, y) < / Code>   

No comments:

Post a Comment