Problem with Frequency distribution plot
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
Image Analyst
2023-4-13
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.
回答(1 个)
Image Analyst
2023-4-12
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-');
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!