histogram plot in the Statistic section

classic Classic list List threaded Threaded
3 messages Options
StefanBr StefanBr
Reply | Threaded
Open this post in threaded view
|

histogram plot in the Statistic section

Dear PIVlav users, Dear William,

I have a question about the histogram plot in the statistic section. I was wondering about the frequency (y-scale) in my plots. To my mind it cannot be the relative frequency (sum>1) but it also cannot be the absolute amount of values as the sum is bigger than the amount of vectors in the analyzed field. Even if I try to rebuild the plot by creating a histogram in MatLab with identical bins I will get a different histogram.

Can anyone (maybe William) give me an insight in the construction/math of this histogram plot in the statistic section?

Thanks in advance,
Stefan
William William
Reply | Threaded
Open this post in threaded view
|

Re: histogram plot in the Statistic section

I will check that.

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.

William William
Reply | Threaded
Open this post in threaded view
|

Re: histogram plot in the Statistic section

In reply to this post by StefanBr
Dear Stefan,
this is the code used in PIVlab_GUI.m (example for u velocity component):
PIVlab_GUI.m wrote
nrofbins=100; %default bin amount
u=reshape(u,size(u,1)*size(u,2),1); %make a vector out of the matrix
[n xout]=hist(u*caluv-retr('subtr_u'),nrofbins); %create histogram data, the old way
 h2=bar(xout,n); %plot histogram
The height of each bar indicates the number of elements in the bin.

I hope this solves your questions.

Please consider donating for the PIVlab project:
http://paypal.me/pools/c/81Y8wBVi4y

The developer needs to update to a recent Matlab release in order to keep the project running.