Forums

spectrogram 4 frequencies and amplitudes

Started by mark pxxxxx October 2, 2005
Lets say I have a square wave at a fixed 440 Hz. I
want to use the spectrogram function, or something
else in Matlab, to extract the harmonics of the
waveform in order of their effect in making up the
sound. So the output would be #1 = 440, etc. Im not
sure how to use the spectrogram function to go about
extracting this specific info and saving the numeric
values in an array, so if you could assist with ideas,
hints, etc. Id appreciate it.

sxxx = square(440);
[bxxx, fxxx, txxx] = specgram(sxxx, 512, 441000);