MATLAB Answers


find the dominant frequency with the use of the command max

Asked by Passband Modulation on 4 Oct 2012

I have a file named “message.txt” containing the waveform of a voice message embedded in a sinusoid with frequency of 220 Hz, and the sampling frequency is 22000 Hz.

file source:

load the file, and the speech heard

 load message.txt
 soundsc(message, 22000)

the spectrum of message,where the magnitude plot of the Fourier transform for message versus frequency in Hz, is observed using the following code


how can i find the dominant frequency of message with the use of the command max?

i tried

 C = max(freq_index)

it does not work



No products are associated with this question.

1 Answer

Answer by PG
on 4 Oct 2012

  1 Comment

it does really help... anyway thx for ur kind reply

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!