Problem with Frequency distribution plot

2 vues (au cours des 30 derniers jours)
AkB
AkB le 12 Avr 2023
Modifié(e) : Torsten le 13 Avr 2023
I have a scatter plot in (x, z). I need to plot a frequency distribution of z-values as a function of x. Please suggest.
  4 commentaires
Image Analyst
Image Analyst le 13 Avr 2023
This is a poorly worded question. Perhaps frequency distribution means histogram. I was thinking it was like a signal and he wanted the frequency spectrum of the signal. But it looks like @AkB is ignoring our comments, so I'm not going to do anything more until we hear back from @AkB with a clearer explanation of what the context/situation is.
Torsten
Torsten le 13 Avr 2023
Modifié(e) : Torsten le 13 Avr 2023
I think he/she is unsure about it himself/herself.

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 12 Avr 2023
If x is not uniformly spaced then use interp1 or spline to get x and z uniformly spaced. Then call fft(z).
ft = fft(z);
plot(abs(ft), 'b-');

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by