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.
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!