Plotting a frequency spectrum for an Impulse Response
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens

Hi there,
I know I might be asking a completely novice question (and apologies on possibly spamming the forums) but I am extremely new with Matlab and still need a step by step guide on how to work this thing out. I've attached a picture on the type of graph that I'm trying to replicate.
I am currently working on trying to plot out the impulse response of a signal on a frequency domain graph. As such, I'm still struggling trying to plot a frequency spectrum graph as shown in the picture. I am unsure of how one would be able to adjust the frequency on the x-axis to match the one shown in the picture as well as how to match the magnitude (db) on the Y-axis. This is what I've got so far:

I'm not sure if the steps I've taken are correct. Any help in terms of carrying out the code and steps would be appreciated!
Regards
0 commentaires
Réponses (1)
Star Strider
le 13 Août 2019
Since the impulse has a uniform spectrum equal to unity, the impulse response of a system (control system, filter, etc.) is generally the Fourier transform of the output of the system.
Note that Figure 4.3.5 is plotted as dB on a logarithmic frequency axis.
The plot you created appears to be linear in both axes. You can calculate dB as:
dB = 20*log10(abs(amplitude))
So your plot call to simulate Figure 4.3.5 would be something like:
figure
semilogx(frequency, 20*log10(abs(amplitude)))
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with Control System Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!