hi, my name is haixiao.
I've been getting a lot of help from this tool to study acoustics. But I am also quiet new to this tool and matlab. I really appreciate if you could provide help.
I'd like to use toneBurst to generate waves with different frequencies. But when I make some changes, for example, if I change the 'tone_burst_freq' from 500 Hz to 5,000,000 Hz and the 'sampling_freq' from 10,000 Hz to 100,000,000 Hz, to see the difference between 500 Hz wave and 5 MHz wave, the results are the same. But it should be different. I'm not sure what kind of problems I have made. Thank you for your help!
here is the code I used and please feel free to run it to see what I am talking about.
again, I would greatly appreciate any help you could give.
---------------------------------------------------------------------------------------
clear all;
% define the grids
Nx = 300;
Ny = 300;
dx = 75e-3; % m
dy = 75e-3; % m
kgrid = kWaveGrid(Nx,dx,Ny,dy); % create the grid
% define the medium terms
medium.sound_speed = 1500*ones(Nx,Ny); % m * s^(-1) water
medium.density = 997; % kg * m^(-3) water
% define the source.p mask
disc5 = zeros(Nx,Ny);
circle = makeCircle(300,300,150,150,100,(90/180)*pi);
disc5 = disc5+circle;
source.p_mask = disc5;
% define a tone burst
sampling_freq = 1e4; % Hz 10000 or 100,000,000
tone_burst_freq = 5e2; % Hz 500 or 5,000,000
tone_burst_cycles = 1;
source.p = 2*toneBurst(sampling_freq, tone_burst_freq, tone_burst_cycles);
% define the sensor terms
sensor.mask = eye(Nx,Ny);%diag(r,0);
% run the simulation
sensor_data = kspaceFirstOrder2D(kgrid,medium,source,sensor);
% draw the figure
figure;
imagesc(sensor_data, [-1, 1]);
colormap(getColorMap);
ylabel('Sensor Position');
xlabel('Time Step');
colorbar;