# I cannot get Spectrogram to highlight a single frequency signal

1 vue (au cours des 30 derniers jours)
John Hunt le 15 Juin 2020
I want to use the spectrogram function in matlab, before I do I wanted to make sure I understand it. So I did a small example with a sin wave with 440 Hz as the frequency. However, when I run the spectrogram function its shows that the strongest frequency is around 70 Hz. I would love some clarification.
x = 1:.001:5;
y = sin(440*x);
figure(1); plot(x,y)
figure(2); spectrogram(y, 1000, 500, [], 1000, 'yaxis');
Thanks
##### 2 commentairesAfficher 1 commentaire plus ancienMasquer 1 commentaire plus ancien
John Hunt le 16 Juin 2020
Well, that would make the difference. Thank you for pointing that out to me.

Connectez-vous pour commenter.

### Réponse acceptée

John Hunt le 16 Juin 2020
dpb answered this question in the comments sin() uses radians and the conversion from radians to hertz is 1/(2pi) and 440/(2pi) is 70.03.
##### 0 commentairesAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Digital Filtering dans Help Center et File Exchange

R2019b

### Community Treasure Hunt

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

Start Hunting!

Translated by