Problem with Frequency distribution plot

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 件のコメント

Torsten
Torsten 2023 年 4 月 12 日
A frequency distribution of z-values is a plot where the x-axis are the z-values and the y-axis shows the frequency of the z-values.
But what is a frequency distribution of z-values as a function of x ?
Torsten
Torsten 2023 年 4 月 13 日
So the z-value doesn't matter ? Then simply use histogram(x).
Image Analyst
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.
Torsten
Torsten 2023 年 4 月 13 日
編集済み: Torsten 2023 年 4 月 13 日
I think he/she is unsure about it himself/herself.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2023 年 4 月 12 日

0 投票

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-');

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

AkB
2023 年 4 月 12 日

編集済み:

2023 年 4 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by