How to put in 3D graph?
3 views (last 30 days)
Show older comments
I'm doing an analysis of a EMG signal and want to put the spectogram in a 3D graph! Now i´m using the function imagesc but it gives me a 2D graph! what function do i use?
% perform STFT
[stft, f, t] = stft(Data, wlen, h, nfft, fs);
% take the amplitude of fft(x) and scale it, so not to be a
% function of the length of the window and its coherent amplification
SA = abs(stft)/wlen/K;
% correction of the DC & Nyquist component
if rem(nfft, 2) % odd nfft excludes Nyquist point
SA(2:end, :) = SA(2:end, :).*2;
else % even nfft includes Nyquist point
SA(2:end-1, :) = SA(2:end-1, :).*2;
end
% convert the amplitude spectrogram to dB
SA = 20*log10(SA);
figure(2)
imagesc(t, f, SA)
0 Comments
Answers (1)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!