MATLAB Plotting a Dose-Volume Histogram from Matrix of Values

AI Thread Summary
A user is seeking assistance in plotting a dose-volume histogram using a 150x1 matrix with values ranging from 5.321 to 13.226. They have attempted to sort the matrix and plot it but are encountering an issue where the graph only displays the range of the data instead of the desired range from 0 to 14. The discussion includes questions about the version of MATLAB being used and the specification of histogram bin edges, indicating that these factors may influence the plotting outcome. The focus remains on resolving the plotting issue and achieving the correct histogram representation.
linger
Messages
2
Reaction score
0
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.
 
Physics news on Phys.org
Sure. Do you have some more information you could share about this?
 
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);
xlim([0,14]);

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.
 
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?
 

Similar threads

Replies
4
Views
4K
Replies
2
Views
2K
Replies
12
Views
2K
Replies
3
Views
2K
Replies
32
Views
4K
Replies
4
Views
2K
Replies
5
Views
3K
Replies
1
Views
3K
Back
Top