plot multiple PSD lines in single graph in color scale (imagesc)
古いコメントを表示
Hi, I have 13 signals where I produce the PSD for each with the psd function using Welch's method object (spectrum.welch). But this only allows me to generate separate plots for each signal. Is there a way to express all 13 PSDs in pseudocolor (like imagesc) in a single figure where Y is each of the 13 signals, X is the frequencies, and the color is the power/frequency (dB/Hz)? So basically I want to generate a 13 x n matrix containing the PSD of each signal.
Example:
Fs=10000; %sampling frequency in samples per second
t=0:(1/Fs):1; %one second time vector, 10001 elements
y=0.4*cos(2*pi*2000*t)+0.2*sin(2*pi*1000*t)+randn(size(t));
h = spectrum.welch;
Hpsd=psd(h,y,'Fs',Fs,'ConfLevel',0.95);
figure, plot(Hpsd)
This only gives me 1 plot. If I do this 13 times, how can I create a 13 x n figure where the PSDs are expressed in color? I basically want a figure that looks like imagesc(rand(13,100)) but with PSDs and not random numbers.
Thanks in advance!
採用された回答
その他の回答 (1 件)
Image Analyst
2014 年 1 月 11 日
0 投票
Perhaps the waterfall() function?
カテゴリ
ヘルプ センター および File Exchange で Parametric Spectral Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!