フィルターのクリア

2D Fourier transform for surface fitting

13 ビュー (過去 30 日間)
Sangani Prithvi
Sangani Prithvi 2021 年 9 月 3 日
コメント済み: Image Analyst 2021 年 9 月 4 日
I'm having a scattered x,y,z data and I'm looking for the Fourier series which can fit the scattered data forming a surface. Can anyone suggest any good method that can be adopted for this. I've tried using fft2 but the data is very random, the amplitude and phase spectra are very difficult to be interpreted.

回答 (1 件)

Image Analyst
Image Analyst 2021 年 9 月 3 日
Did you try making your data into an image with scatteredInterpolant and then calling fft2, and then zeroing out the high frequency components, then inverse transforming. I've attached some demos that might help.
  4 件のコメント
Sangani Prithvi
Sangani Prithvi 2021 年 9 月 4 日
Thanks for the response. I'm trying to actually denote the 'z' values as the function of 'x' & 'y' values in trigonometric functions (like Fourier series). I tried to interpret the data, but I'm not able to find the amplitudes and phase angle to convert the data into Fourier series.
Image Analyst
Image Analyst 2021 年 9 月 4 日
What's the function? Like sin(x) + cos(y) or something? Should be just a few lines of code if you use meshgrid to get a list of all (x,y) locations.
x1 = linspace(0, 5*pi, 400);
y1 = linspace(0, 3*pi, 300);
xPeriod = 2;
yPeriod = 2.4;
amplitude = 5;
[x, y] = meshgrid(x1, y1);
z = amplitude * (sin(2 * pi * x / xPeriod) + cos(2 * pi * y / yPeriod));
surf(x, y, z, 'Lines', 'none');
grid on;

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

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by