How to plot histogram/frequency distribution curves ?

조회 수: 8 (최근 30일)
RN
RN 2016년 3월 29일
댓글: RN 2016년 3월 29일
I have two vectors, charge 'q' and corresponding phase angle 'Ph', each of size 899095x1. 'Ph'- min=0 degree, max=360 degree & 'q'- min=-4e-12, max=4.5e-12. I want to plot two distribution curves, in which the x-axis is my phase angle vectors which is divided into small phase windows of width,say 1.5 degree. One distribution curve should have X axis from 0-180 and another distribution curve having X axis varying from 180-360 and y axis(for both curve) : 1. number of charges present in that phase window. 2. sum of charge values observed in phase window. 3. average value of charge value observed in phase window. 4. maximum value of charge observed in phase window.

답변 (2개)

Steven Lord
Steven Lord 2016년 3월 29일
If I understand what you're asking I believe some combination of HISTOGRAM and/or ACCUMARRAY will do what you want.
  댓글 수: 1
RN
RN 2016년 3월 29일
What are the codes to plot such distribution curves ?

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2016년 3월 29일
Maybe this:
histogram(yourChargeArray); % Display histogram
countOfCharges = sum(yourChargeArray(:) ~= 0)
totalCharges = sum(yourChargeArray(:))
averageChargeValue = mean(yourChargeArray(:));
maxChargeValue = max(yourChargeArray(:));
  댓글 수: 1
RN
RN 2016년 3월 29일
By doing this, my x-axis won't be the phase angle. I want my x-axis to be phase angle vectors which is divided into small phase windows of width,say 1.5 degree and Y axis should be the count of charges or maximum charge magnitude or average of charge, within that phase window.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by