Effacer les filtres
Effacer les filtres

What is the finite nature of MATLAB?

2 vues (au cours des 30 derniers jours)
Nghi
Nghi le 2 Avr 2024
Modifié(e) : Matt J le 2 Avr 2024
Hello all, I am plotting a sinc function, X= sinc (f) where f = -22050 to 22050, with a step of 0.1691, it can be seen in the plot below that this function has a very very densed plot:
However, when I zoomed in, it's still a plot of the sinc function, just very very densed due to the wide range and small step.
Then the next step is to inverse fourier transform this, which gave me the correct plot below in time domain as the pair is:
The quesion I received was observe the inaccuracies (if any) and give a reason why is it like that, the hint is to think about the finite nature of MATLAB. The overshoot of the time domain spectrum I can explain by Gibb's phenomenon. However, I don't understand what is in MATLAB that's called finite nature. Is this where when the range is too big and the step is too small (like the spectrum of sinc above) then MATLAB will just give us something out of limit that no one can fully see except zooming every single unit? Thank you for your time
  3 commentaires
Nghi
Nghi le 2 Avr 2024
Well not exactly, some errors are there but the pattern and the major values are correct
Paul
Paul le 2 Avr 2024
Modifié(e) : Paul le 2 Avr 2024
The Gibbs phenomenon, if that's really what it is, shown above is in the frequency domain, not the time domain.

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 2 Avr 2024
Modifié(e) : Matt J le 2 Avr 2024
It is not the finite nature of Matlab, but rather the finite nature of an FFT. You are not transforming a true sinc function because a true sinc function extends to infinity, whereas the FFT works with some finite truncation of it. Also, the FFT does not consider the continuous values of the sinc, but rather a finite sampling of it.
  4 commentaires
Matt J
Matt J le 2 Avr 2024
The DTFT of the discrete-time sinc is a rectangular pulse in the frequency domain, so sampling the continuous-time sinc shouldn't be an issue (as long as the sampling period is small enough)
Well, okay, but that is not true for arbitrary signals. The DTFT of a discrete-time rect pulse will never give you a precise sinc, for example, no matter the sampling period.
Matt J
Matt J le 2 Avr 2024
Modifié(e) : Matt J le 2 Avr 2024
Hello. Im understanding this as Matlab cannot transform an infinite array of time so it's against theory...
That's part of it, but I think the better way to see it as that the DFT (or its inverse) is not the same thing as a continuous Fourier Transform (or its inverse). It can approximate a continuous transform better as your sampling gets better, but the approximation can suffer when the sampling is either too coarse or too truncated in duration.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange

Tags

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by