How to apply this process on a FITS file?

1 view (last 30 days)
Mohamed Nedal
Mohamed Nedal on 25 Aug 2015
Edited: Mohamed Nedal on 25 Aug 2015
Hi there, I need to apply the process in the following script on a FITS file instead of the inserted function/signal "splat" :
load splat
sg = 400;
ov = 300;
spectrogram(y,sg,ov,[],Fs,'yaxis')
colormap bone
[s,f,t,p] = spectrogram(y,sg,ov,[],Fs);
f1 = f > 100;
t1 = t < 0.75;
m1 = medfreq(p(f1,t1),f(f1));
f2 = f > 2500;
t2 = t > 0.3 & t < 0.65;
m2 = medfreq(p(f2,t2),f(f2));
hold on
plot(t(t1),m1/1000,'linewidth',4)
plot(t(t2),m2/1000,'linewidth',4)
hold off
I supposed to get output like that:
But even this output I couldn't get, because there's no median frequency function installed with MATLAB. Would you please send m-file for medfreq and tell me how to write a script do what I want here?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!