ヒストグラムの時間変化グラフの出力

1秒間でN=1000点の値を時系列で記録した電圧信号があると仮定した場合、 x軸は時間、y軸は電圧、z軸は1秒間の信号を0.1秒毎に10分割したヒストグラムの度数を色で、 平面に表現する方法はありませんか?
以下が元信号です。
Fs = 1/1000 ; % サンプリング周波数
t = (0:1:999) * Fs; % 時間軸
y = sin(2*pi*1*t); % 信号
使っているversionは以下です。
--------------------------------------------------------------------------------------------------
MATLAB バージョン: 9.2.0.556344 (R2017a)
MATLAB ライセンス番号: DEMO
オペレーティング システム: Microsoft Windows 10 Pro Version 10.0 (Build 14393)
Java バージョン: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
--------------------------------------------------------------------------------------------------
MATLAB バージョン 9.2 (R2017a)

3 comentarios

Walter Roberson
Walter Roberson el 21 de Jul. de 2017
Approximate translation:
Assuming that there is a voltage signal recorded in time series of N = 1000 points in one second, the x axis is time, the y axis is voltage, and the z axis is histogram obtained by dividing the signal of 1 second every 10 seconds Is there a way to express the frequency of the frequency on a plane in color?
The following is the original signal.
Fs = 1/1000;% sampling frequency
T = (0: 1: 999) * Fs;% Time axis
Y = sin (2 * pi * 1 * t);% signal
The version you are using is below.
michio
michio el 21 de Jul. de 2017
Editada: michio el 22 de Jul. de 2017
すいません、最終的に描かれたい図のイメージがつかめません・・ 例えば・・0.1秒毎に、すなわち 0sから0.1s、0.1sから0.2s、0.2sから0.3s それぞれの区間で10個のヒストグラムを作成し、重ねて描くイメージですか?
masahiro kida
masahiro kida el 22 de Jul. de 2017
0sから0.1s、0.1sから0.2s…のそれぞれの区間で10個のヒストグラムを作成し、 x軸は時間、y軸は電圧としてヒストグラムをヒートマップで表示したいと考えています。

Iniciar sesión para comentar.

 Respuesta aceptada

michio
michio el 22 de Jul. de 2017

4 votos

x軸は0sから0.1s、0.1sから0.2s…のそれぞれの区間、y軸は電圧に対応。ビン数の要素数をヒートマップで。こんなイメージでしょうか。
もっと良いやり方があるのではとは思いながら、、 histocounts 関数 heatmap 関数 を組み合わせて半ば無理やり作ってみましたが、ラベルを思い通りにするのに多少手間がかかるかもしれませんね。
Fs = 1/1000;% sampling frequency
t = (0:1:999)*Fs;% Time axis
Y = sin(2*pi*1*t);% signal
nbins = 20; % 電圧方向のビン数
[~,edges] = histcounts(Y,nbins); % エッジ計算
YY = reshape(Y, [], 10); % 時系列方向に10個に分割
counts = zeros(nbins,10); % ビンの要素数用の変数
for ii=1:10
counts(:,ii) = histcounts(YY(:,ii),edges);
end
% heatmap(xvalues,yvalues,cdata);
heatmap(1:10, edges(1:end-1), counts)

Más respuestas (0)

Productos

Preguntada:

el 21 de Jul. de 2017

Respondida:

el 22 de Jul. de 2017

Community Treasure Hunt

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

Start Hunting!