필터 지우기
필터 지우기

3D FFT. initialization

조회 수: 4 (최근 30일)
Tlotlo Oepeng
Tlotlo Oepeng 2021년 5월 10일
%% -- propagation Variable(z) --
L = 30; % length of space
step_num = 300; % represented z steps
dz = L/step_num; % Step size in z = 0.1
%% %% -- t, x, and y Arrays --
nt = 500;
tmax = 50 ; % FFT point and window size
t2 = (0:dt:tmax); % Temporal Grid
t = t2(1:nt);
ktt = (2*pi/tmax)*[0:nt/2 -nt/2:-2]; % Frequency Grid
dt = tmax/nt; % Step size in t
N = 500; % No. of Fourier modes(sample points)
gridsize = 10;
x = (gridsize/N)*(-N/2:N/2-1); % Grid point along x
y = (gridsize/N)*(-N/2:N/2-1); % Grid point along y
[X,Y] = meshgrid(x,y);
% -- wave numbers
kx = [0:N/2 -N/2+1:-1];
ky = [0:N/2 -N/2+1:-1];
[kxx,kyy]= meshgrid(kx,ky); % Wave number along both direction
kxx = (2*pi/gridsize)*kxx; % scaling
kyy = (2*pi/gridsize)*kyy;
im solving a 3D wave eqaution using split step FM. the wave is moving along z, i have an extra propgation Vector K in time "ktt". im wondering if my initializtion is correct. or shoiuld i do a 3d mesh grid [T,X,Y]?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by