STFR spectrogram axes and window.

2 views (last 30 days)
Debela
Debela on 18 Sep 2013
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.

Answers (0)

Categories

Find more on Time-Frequency Analysis 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!