STFR spectrogram axes and window.
Afficher commentaires plus anciens
Hello, I need some help on spectrogram. On time-frequency contour the x-axis starts around 25.4 which leads to confusion. I need it to start from 0 as y axis. My x-axis is assigned for time and y-axis for frequency. clear all; close all; clc;
a=uigetfile('.txt');
b=dlmread(a); % size of file is 3000 x 2
x=b(:,1);
tt=0:0.2:(length(x)-1)*0.2; % sampling rate is 5000000 ( I multiplied the %valued to change it to micro seconds)
[y,f,t,p]=spectrogram(x,1:256,255,[],5000000,'yaxis'); %
subplot(212)
surf(t,f,abs(p),'EdgeColor','none');
axis xy; axis tight; colormap(jet);
view(0,90);
subplot(211)
plot(tt,x) % signal in time
But the signal in time plot is fine. I just put it for comparison purpose. I would appreciate any hint.
Réponses (0)
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!