histogram2から数値テーブルを作成したい

2 visualizaciones (últimos 30 días)
和也
和也 el 2 de Ag. de 2022
Editada: Hiro Yoshino el 2 de Ag. de 2022
histogram2は2変量頻度分布図に作成されますが、この図から数値テーブルを作成したいと思います。
ヒストグラムからは全体的なデータの分布を把握し、加工用としてテーブルの値をピックアップして利用したいためです。
詳しい方ご回答よろしくお願いします。

Respuestas (1)

Hiro Yoshino
Hiro Yoshino el 2 de Ag. de 2022
Editada: Hiro Yoshino el 2 de Ag. de 2022
histcount2 を使うと良いかと思います。以下の N でテーブル(行列) を得られます。
https://jp.mathworks.com/help/matlab/ref/histcounts2.html
x = randn(100,1);
y = randn(100,1);
[N,Xedges,Yedges] = histcounts2(x,y)
N = 7×6
0 1 0 0 0 0 0 4 9 4 0 0 0 3 10 9 4 0 1 3 9 13 10 1 0 6 1 7 1 0 0 0 3 0 0 0 0 0 0 0 1 0
Xedges = 1×8
-3 -2 -1 0 1 2 3 4
Yedges = 1×7
-3 -2 -1 0 1 2 3
histogram2(x,y,Xedges,Yedges)

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!