Set an x-axis of a histogram in matlab to get a subset of the histogram -


i have histogram plotted in matlab , want work section of histogram. have found how change x-axis overall, plots entire histogram on new axis instead of pulling subset of histogram. there way work section of histogram selecting x-axis?

you can plot of histogram want choosing subsection of matrix,

bins = 100 xmin = 40 xmax = 60 [f,x]=hist(randn(1000000,1),bins); bar(x(xmin:xmax),f(xmin:xmax)) 

alternatively, can plot on specified range of x bin values,

xvalues = -1:0.1:0.9; [f,x]=hist(randn(1000000,1),xvalues);    bar(x,f,'b') 

but values outside range collected in bins @ either end if range.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -