How to define the spatial frequency in Matlab?
Show older comments
Hello all,
I am working on the simulation of 1-D nonlinear elastic waves using Iteration contrast source technique. In which, I have some questions on a correct definition for spatial frequency and wavenumber. The spatial differential operator in the nonlinear force term (dx^2 and dx) will become (-k^2 and -j*k) in the frequency domain (j-imaginary number). I understand that wrong definition of k vector has a huge impact on the results because of the multiplication of square terms (-k^2) to u (displacement). I have shown my code which has different definitions of k (where M-spatial sample points). Also, whether the spatial frequency of a longitudinal wave (k_x) and shear wave (k_y and k_z) are same or different? Please share your knowledge. Many thanks in advance.
%%Spatial frequency
% dk=1/(dx); % Wavenumber increment
% kp=([(0:M/2-1) (-M/2:-1)]./M) * (dk); % == k_x %with/without 2*pi
% ks=([(0:M/2-1) (-M/2:-1)]./M) * (dk); % == k_x
% kp=(0:M-1)*(dk);
% ks=(0:M-1)*(dk);
% Zero padded
% dk=1/(dx); % Wavenumber increment
% kp=([(0:(2*M)/2-1) (-(2*M)/2:-1)]./(M)) * (dk); % == k_x%with/without 2*pi
% ks=([(0:(2*M)/2-1) (-(2*M)/2:-1)]./(M)) * (dk); % == k_x%with/without 2*pi
2 Comments
David Goodmanson
on 31 Jan 2018
Hi Elango,
Will you be using Matlab fft to do this?
Elango Selvam
on 31 Jan 2018
Accepted Answer
More Answers (0)
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!