smooth curve smooth curve

4 views (last 30 days)
Latifa Bouguessaa
Latifa Bouguessaa on 17 Nov 2022
Answered: Star Strider on 17 Nov 2022
Hello, everyone.
How can I best smooth the curve (see attachment) (fitting)? Do you have an idea?
I thank you
  2 Comments
Latifa Bouguessaa
Latifa Bouguessaa on 17 Nov 2022
I just need a function that smoothes the curve

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 17 Nov 2022
That appears to me to be a fft result after using the fftshift function on it. Each of the ‘peaks’ is a different frequency component.
Experiment with zero-padding the fft:
L = numel(s);
NFFT = 2^nextpow2(L);
FTs = fft(s, NFFT)/L;
Here, ‘s’ is the original time-domain signal.
The frequency vector should go from -Fn to + Fn, where ‘Fn’ is the Nyquist frequency (one-half of the sampling frequency).
.

Community Treasure Hunt

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

Start Hunting!