Performing the transform on the below logic

1 回表示 (過去 30 日間)
Amy Topaz
Amy Topaz 2022 年 3 月 14 日
コメント済み: Amy Topaz 2022 年 3 月 28 日
I have the below function for which I need to perform spatial Fourier transform and plot its spatial frequency spectrum for various values of y.
How to do this using matlab?
Y1 = acos(x/2+y) + asin(g/3+x);
%g is constant
  1 件のコメント
AndresVar
AndresVar 2022 年 3 月 14 日
編集済み: AndresVar 2022 年 3 月 14 日
for various values of y & x?
you can create a meshgrid of y's and x's
evaluate the function f(x,y)

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

採用された回答

AndresVar
AndresVar 2022 年 3 月 14 日
Make a grid, evaluate the function and use fft2 to get the spatial spectrum.
Here is an example, note function might be different fom what you posted.
Note fftshift was used to shift the spectrum to the center, you can try without.
g=10; % for example
x=linspace(1,4,10); % for example
y=linspace(1,4,10); % for example
[X,Y]=meshgrid(x,y); % a grid
F = (atan(g/2+X)./Y+atan(g/2-X)./Y)/pi; % evaluate the grid
F_PS = abs(fftshift(fft2(F))); % power spectrum, shifted
imagesc(F_PS);
  1 件のコメント
Amy Topaz
Amy Topaz 2022 年 3 月 28 日
Thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by