Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Replies: 4   Last Post: Dec 26, 2013 7:45 AM

 Messages: [ Previous | Next ]
 Dhanashree Posts: 3 Registered: 12/24/13
Posted: Dec 25, 2013 11:07 AM

"Loren Shure" wrote in message <l9c8pl\$sqb\$1@newscl01ah.mathworks.com>...
> "Dhanashree " <dhanurane17@gmail.com> wrote in message
> news:l9bb9t\$kbi\$1@newscl01ah.mathworks.com...

> > y=abs(x_fft(1:M/2,:));
> > imagesc(t,f,dB(y))
> >
> > imagesc gives me the spectrogram.that is i have used that function to plot
> > the spectrogram.y is giving the magnitude of the fft calculated.In the
> > above function what does dB(y) do? when i use only y i get complete ble
> > coloured spectrogram.plz help.
> >

>
> dB is either a function that you have or a variable you haven't shown us
> yet. It looks like it's meant to be a decibel calculation, but without the
> code, hard to say...
>
>
>
> --
> --Loren
>
> http://blogs.mathworks.com/loren

ok.....i am giving you the whole program i have.It is basically program to plot spectrogram.plz explain it to me.

M=256;
B=floor(N/M);
x_mat=reshape(x(1:M*B),[M B]);
hamming(M);
win_mat=repmat(hamming(M),[1 B]);
x_fft=(x_mat.*win_mat);
y=abs(x_fft(1:M/2,:));
t=(1:B)*(M/fs);
f=((0:M-1)/(M-1)*(fs/2));
f;
%bark=frq2bark(f);
%bark=13.*atan(0.00076*f)+3.5.*atan((f/7500)^2);
figure(2);
imagesc(t,f,dB(y));
colormap(jet);
colorbar;
set(gca,'ydir','normal');
xlabel('Time(sec)');
ylabel('Frequency(Hz)');
title('Spectrogram');

Date Subject Author
12/24/13 Dhanashree
12/24/13 Loren Shure
12/25/13 Dhanashree
12/26/13 Loren Shure
12/26/13 Nasser Abbasi