Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB histogram

  1. Nov 16, 2014 #1
    Hi, I have a matrix 150x1 with values between 5.321 to 13.226 and I want to use the matrix and plot a dose-volume histogram (https://en.wikipedia.org/wiki/Dose-volume_histogram).
    Can someone help me.
  2. jcsd
  3. Nov 17, 2014 #2


    User Avatar
    Gold Member

    Sure. Do you have some more information you could share about this?
  4. Nov 17, 2014 #3
    no, not really, but have tried to solve it and have come this far

    D = sort(D); %D matrix 150x1
    x= [150:-1:1]*100/150;
    plot(D, x);

    have I done it right so far?
    the graph plots only from the smallest x value 5.321 to the highest 13.226 and I want it to draw from 0 to 14.
  5. Nov 18, 2014 #4


    User Avatar
    Gold Member

    Which release of MATLAB are you using?

    Also, do you have an idea of what you want the edges of the histogram bins to be?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: MATLAB histogram
  1. Histogram in MATLAB (Replies: 5)

  2. Histogram and PDF (Replies: 0)

  3. Histogram in EXCEL (Replies: 3)