ヒストグラムのx軸とy軸を指定する。
Afficher commentaires plus anciens
例えば計算結果がx=1,1,1,1,1,2,2,2,2,2だったとして、本当はx軸を1、2、3などとして、y軸を結果の値(一個目なら1、10個目なら2)というふうに表示したいのですが、結果がx軸が結果の値、y軸が結果の値が何回あったか(xが1の時yが5、xが2の時yが5)となってしまいます。
わかる方いらっしゃったら教えていただきたいです。
Réponses (1)
言葉通りに解釈すると、それはヒストグラムではなく棒グラフだと思います。
x = [1,1,1,1,1,2,2,2,2,2];
bar(x) % x軸を1,2,3,...、y軸を結果の値(1個目なら1, 10個目なら2)
Catégories
En savoir plus sur Histograms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!