wscalogram and subplots
이전 댓글 표시
Hi.
I'm trying to make a subplot containing a scalogram, original signal and a spectrogram.
The problem is that MATLAB ignores the scalogram and just doesn't show it. The original signal obtained in the top using wscalogram should not be showed, only the scalogram and another original signal made by some other commands. So how to do that?
subplot(3,1,1); the plot of the original signal
subplot(3,1,2); wscalogram('image',c,'scales',scales,'ydata',signal,'xdata', t)
subplot(3,1,3); the plot of the spectrogram
So I want the ydata to be gone but the xdata should still be shown on the x-axis for the scalogram, and when I delete ydata, xdata has no influence.
I hope you can help!
-Trine
답변 (1개)
Wayne King
2012년 2월 29일
Hi Trine, Call wscalogram() with the first input just ' ' and return an output, which you can plot as an image. For example:
wname = 'mexh';
scales = (1:128);
load cuspamax
signal = cuspamax;
coefs = cwt(signal,scales,wname);
SCimg = wscalogram('',coefs,'scales',scales,'ydata',signal);
subplot(311)
plot(signal); ylabel('Amplitude');
subplot(312)
imagesc(1:length(signal),scales,SCimg);
axis xy;
ylabel('Scales'); xlabel('Time'); title('Wavelet Scalogram');
subplot(313)
%plot spectrogram here
카테고리
도움말 센터 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!