<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: change frequency of toneBurst</title>
		<link>http://www.k-wave.org/forum/topic/change-frequency-of-toneburst</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 22:27:04 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/change-frequency-of-toneburst" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "change frequency of toneBurst"</title>
			<link>http://www.k-wave.org/forum/topic/change-frequency-of-toneburst#post-6785</link>
			<pubDate>Sun, 17 Mar 2019 22:43:11 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6785@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Haixiao,&#60;/p&#62;
&#60;p&#62;You should define your sampling frequency to be the same sampling frequency used by the simulation, i.e., &#60;code&#62;1/kgrid.dt&#60;/code&#62;. This will mean defining the time sampling before you define your source signal, e.g., by calling the &#60;code&#62;makeTime&#60;/code&#62; or &#60;code&#62;setTime&#60;/code&#62; methods of the &#60;code&#62;kWaveGrid&#60;/code&#62; class.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>haixiao on "change frequency of toneBurst"</title>
			<link>http://www.k-wave.org/forum/topic/change-frequency-of-toneburst#post-6764</link>
			<pubDate>Fri, 01 Mar 2019 04:46:29 +0000</pubDate>
			<dc:creator>haixiao</dc:creator>
			<guid isPermaLink="false">6764@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,Tristan &#60;/p&#62;
&#60;p&#62;Thank you for your answer!&#60;/p&#62;
&#60;p&#62;So in order to observe the difference between waves at different frequencies, how should I set the sampling and signal frequencies. I'm always a little confused about their relation.&#60;/p&#62;
&#60;p&#62;Thank you in advance!&#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
Haixiao
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Tristan2 on "change frequency of toneBurst"</title>
			<link>http://www.k-wave.org/forum/topic/change-frequency-of-toneburst#post-6763</link>
			<pubDate>Thu, 28 Feb 2019 12:28:14 +0000</pubDate>
			<dc:creator>Tristan2</dc:creator>
			<guid isPermaLink="false">6763@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Haixiao, &#60;/p&#62;
&#60;p&#62;why do you expect it to be any different? The signal (in terms of samples) should look exactly the same if you scale the sampling and signal frequencies by the same amount. If you look at it in terms of time, the signal with the higher frequency is 10000 times shorter. &#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
Tristan
&#60;/p&#62;</description>
		</item>
		<item>
			<title>haixiao on "change frequency of toneBurst"</title>
			<link>http://www.k-wave.org/forum/topic/change-frequency-of-toneburst#post-6762</link>
			<pubDate>Thu, 28 Feb 2019 04:45:34 +0000</pubDate>
			<dc:creator>haixiao</dc:creator>
			<guid isPermaLink="false">6762@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hi, my name is haixiao.&#60;br /&#62;
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.&#60;/p&#62;
&#60;p&#62;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!&#60;/p&#62;
&#60;p&#62;here is the code I used and please feel free to run it to see what I am talking about.&#60;/p&#62;
&#60;p&#62;again, I would greatly appreciate any help you could give.&#60;/p&#62;
&#60;p&#62;---------------------------------------------------------------------------------------&#60;/p&#62;
&#60;p&#62;clear all;&#60;/p&#62;
&#60;p&#62;% define the grids&#60;br /&#62;
Nx = 300;&#60;br /&#62;
Ny = 300;&#60;br /&#62;
dx = 75e-3; % m&#60;br /&#62;
dy = 75e-3; % m&#60;br /&#62;
kgrid = kWaveGrid(Nx,dx,Ny,dy); % create the grid&#60;/p&#62;
&#60;p&#62;% define the medium terms&#60;br /&#62;
medium.sound_speed = 1500*ones(Nx,Ny); % m * s^(-1)  water&#60;br /&#62;
medium.density = 997; % kg * m^(-3)  water&#60;/p&#62;
&#60;p&#62;% define the source.p mask&#60;br /&#62;
disc5 = zeros(Nx,Ny);&#60;br /&#62;
circle = makeCircle(300,300,150,150,100,(90/180)*pi);&#60;br /&#62;
disc5 = disc5+circle;&#60;br /&#62;
source.p_mask = disc5;&#60;/p&#62;
&#60;p&#62;% define a tone burst&#60;br /&#62;
sampling_freq = 1e4; % Hz 10000 or  100,000,000&#60;br /&#62;
tone_burst_freq = 5e2; % Hz 500 or  5,000,000&#60;br /&#62;
tone_burst_cycles = 1;&#60;br /&#62;
source.p = 2*toneBurst(sampling_freq, tone_burst_freq, tone_burst_cycles);&#60;/p&#62;
&#60;p&#62;% define the sensor terms&#60;br /&#62;
sensor.mask = eye(Nx,Ny);%diag(r,0); &#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid,medium,source,sensor);&#60;/p&#62;
&#60;p&#62;% draw the figure&#60;br /&#62;
figure;&#60;br /&#62;
imagesc(sensor_data, [-1, 1]);&#60;br /&#62;
colormap(getColorMap);&#60;br /&#62;
ylabel('Sensor Position');&#60;br /&#62;
xlabel('Time Step');&#60;br /&#62;
colorbar;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
