Suppose that we have some sample:

y =


and somehow I know that it is obtained via a sinusoidal method which contains two sine functions at different frequencies and amplitudes, so I apply the music method:


and obtain the plot:

enter image description here

I know the location of peaks at the normalized peaks, but I don't know the actual frequency. How can I find it?

I know the formula is $\frac{\text{normalized frequency}*f_s}{2}$, but what about $f_s$? Can I find it?


1 Answer 1


[Y,FS,NBITS]=wavread(FILE) returns the sample rate (FS) in Hz and the number of bits per sample (NBITS) used to encode the data in the music file.

After that, [S,F] = pmusic(Y,4,F,FS) to compute the pseudospectrum at frequencies F in Hz.

  • $\begingroup$ but what is file?and what is inside it? $\endgroup$
    – user350
    Feb 16, 2014 at 16:42
  • $\begingroup$ actualy i want to find frequency,not indicate myself $\endgroup$
    – user350
    Feb 16, 2014 at 16:43
  • $\begingroup$ how do you get the original data y? You cannot get any information directly from an arbitrary given vector. I thought you sampled the data from a music file or something. $\endgroup$
    – lennon310
    Feb 16, 2014 at 16:45
  • $\begingroup$ no i have some date,which is given at some frequency,but in real live should i know sampled frequency? $\endgroup$
    – user350
    Feb 16, 2014 at 16:54
  • $\begingroup$ suppose that that is signal coming from somewhere with additive noise,then what should i do? $\endgroup$
    – user350
    Feb 16, 2014 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.