Ploting a Histogram with two data sets (One data set with respect to the other).

조회 수: 2 (최근 30일)
I have two data sets.
x=[-9.3185, -9.2809,-9.2079,-9.1043,-9.1989,-9.1040,-9.1865,-9.0970,-9.0852,-9.0967,-9.0896,-9.0846,-9.2835,-9.2491,-9.2169,-9.1427,-9.0873,-9.1802,-9.0863,-9.0943];
y = [0.0128, 0.0722, 0.2098, 0.9446,0.2285, 0.9432, 0.2569, 0.5678, 0.6726, 0.5697, 0.6216,0.7959, 0.0678, 0.1275,0.19,0.3762,0.8315,0.2721,0.6565,0.5854];
I would like to plot a histogram of x with respect to y.
Thank you for your assistance.

채택된 답변

Steven Lord
Steven Lord 2021년 1월 13일
Do you want a 2-D histogram?
x = [-9.3185, -9.2809,-9.2079,-9.1043,-9.1989,-9.1040,-9.1865,-9.0970,-9.0852,-9.0967,...
-9.0896,-9.0846,-9.2835,-9.2491,-9.2169,-9.1427,-9.0873,-9.1802,-9.0863,-9.0943];
y = [0.0128, 0.0722, 0.2098, 0.9446,0.2285, 0.9432, 0.2569, 0.5678, 0.6726, 0.5697, ...
0.6216,0.7959, 0.0678, 0.1275,0.19,0.3762,0.8315,0.2721,0.6565,0.5854];
histogram2(x, y)

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by