<?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: Determining Frequency</title>
		<link>http://www.k-wave.org/forum/topic/determining-frequency</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:36:43 +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/determining-frequency" rel="self" type="application/rss+xml" />

		<item>
			<title>bencox on "Determining Frequency"</title>
			<link>http://www.k-wave.org/forum/topic/determining-frequency#post-8516</link>
			<pubDate>Mon, 25 Apr 2022 19:37:04 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">8516@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;You are setting an initial pressure with &#60;code&#62;source.p0&#60;/code&#62; whereas you want a time-varying source &#60;code&#62;source.p&#60;/code&#62;, which you have commented out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>hasansss on "Determining Frequency"</title>
			<link>http://www.k-wave.org/forum/topic/determining-frequency#post-8493</link>
			<pubDate>Fri, 01 Apr 2022 11:52:39 +0000</pubDate>
			<dc:creator>hasansss</dc:creator>
			<guid isPermaLink="false">8493@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I would like to change my frequency in k-Wave but ı could not change it by using the below codes. Graphs remain same when I changed the values . How can it be changed? Do you have any suggestions?&#60;/p&#62;
&#60;p&#62;Codes that I used&#60;br /&#62;
 % define properties of the input signal&#60;br /&#62;
source_strength = 10e6;          % [MPa]&#60;br /&#62;
tone_burst_freq = 0.5e6;        % [Hz]&#60;br /&#62;
tone_burst_cycles = 5000;&#60;br /&#62;
kgrid.dt = 1000;&#60;/p&#62;
&#60;p&#62;** I tried to change these four values but graph remain same&#60;/p&#62;
&#60;p&#62;All my code&#60;br /&#62;
clc&#60;br /&#62;
clear&#60;br /&#62;
% set the size of the perfectly matched layer (PML)&#60;br /&#62;
PML_X_SIZE = 10;            % [grid points]&#60;br /&#62;
PML_Y_SIZE = 10;            % [grid points]&#60;br /&#62;
PML_Z_SIZE = 10;            % [grid points]&#60;/p&#62;
&#60;p&#62;% set total number of grid points not including the PML&#60;br /&#62;
Nx = 50 - 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 50 - 2*PML_Y_SIZE;    % [grid points]&#60;br /&#62;
Nz = 50 - 2*PML_Z_SIZE;     % [grid points]&#60;/p&#62;
&#60;p&#62;dx = 0.1e-3;        % grid point spacing in the x direction [m]&#60;br /&#62;
dy = 0.1e-3;        % grid point spacing in the y direction [m]&#60;br /&#62;
dz = 0.1e-3;        % grid point spacing in the z direction [m]&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1400* ones(Nx, Ny,Nz);   % [m/s]&#60;br /&#62;
medium.sound_speed(Nx/2:Nx, :,:) = 1600;       % [m/s]&#60;br /&#62;
medium.density = 1 * ones(Nx, Ny,Nz);       % [kg/m^3]&#60;br /&#62;
medium.density(Nx/2:Nx, :, :) = 1;          % [kg/m^3]&#60;br /&#62;
% simulation settings&#60;br /&#62;
DATA_CAST = 'single';&#60;br /&#62;
disc_magnitude = 10; % [Pa]&#60;br /&#62;
disc_x_pos = 20;    % [grid points]&#60;br /&#62;
disc_y_pos = 3; % [grid points]&#60;br /&#62;
disc_z_pos = 2;&#60;br /&#62;
disc_radius = 1;    % [grid points]&#60;br /&#62;
%disc_2 = disc_magnitude * makeDisc(Nx, Ny,Nz ,disc_x_pos, disc_y_pos,disc_z_pos, disc_radius);&#60;br /&#62;
% create source mask&#60;br /&#62;
source.p_mask = makeBall(Nx, Ny,Nz ,disc_x_pos, disc_y_pos,disc_z_pos, disc_radius);&#60;br /&#62;
source.p0 = source.p_mask;&#60;br /&#62;
% define properties of the input signal&#60;br /&#62;
source_strength = 10e6;          % [MPa]&#60;br /&#62;
tone_burst_freq = 0.5e6;        % [Hz]&#60;br /&#62;
tone_burst_cycles = 5000;&#60;br /&#62;
kgrid.dt = 1000;&#60;/p&#62;
&#60;p&#62;% create the input signal using toneBurst&#60;br /&#62;
input_signal = toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);&#60;br /&#62;
% create the input signal using toneBurst&#60;br /&#62;
%source.p = source_strength .* toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);&#60;br /&#62;
% DEFINE THE ULTRASOUND TRANSDUCER&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% physical properties of the transducer&#60;br /&#62;
transducer.number_elements = 3;    % total number of transducer elements&#60;br /&#62;
transducer.element_width = 1;       % width of each element [grid points/voxels]&#60;br /&#62;
transducer.element_length = 3;     % length of each element [grid points/voxels]&#60;br /&#62;
transducer.element_spacing = 1;     % spacing (kerf  width) between the elements [grid points/voxels]&#60;br /&#62;
transducer.radius = inf;            % radius of curvature of the transducer [m]&#60;/p&#62;
&#60;p&#62;% calculate the width of the transducer in grid points&#60;br /&#62;
transducer_width = transducer.number_elements * transducer.element_width ...&#60;br /&#62;
    + (transducer.number_elements - 1) * transducer.element_spacing;&#60;/p&#62;
&#60;p&#62;% use this to position the transducer in the middle of the computational grid&#60;br /&#62;
%transducer.position = round([1, Ny/2 - transducer_width/2, Nz/2 - transducer.element_length/2]);&#60;br /&#62;
transducer.position = [0.5,0.5,0.5];&#60;br /&#62;
% properties used to derive the beamforming delays&#60;br /&#62;
transducer.sound_speed = 100;                  % sound speed [m/s]&#60;br /&#62;
transducer.focus_distance = 25e-3;              % focus distance [m]&#60;br /&#62;
transducer.elevation_focus_distance = 19e-3;    % focus distance in the elevation plane [m]&#60;br /&#62;
transducer.steering_angle = 0;                  % steering angle [degrees]&#60;/p&#62;
&#60;p&#62;% apodization&#60;br /&#62;
transducer.transmit_apodization = 'Rectangular';&#60;br /&#62;
transducer.receive_apodization = 'Rectangular';&#60;/p&#62;
&#60;p&#62;% define the transducer elements that are currently active&#60;br /&#62;
transducer.active_elements = zeros(transducer.number_elements, 1);&#60;br /&#62;
transducer.active_elements(1:3) = 1;&#60;/p&#62;
&#60;p&#62;% create the transducer using the defined settings&#60;br /&#62;
transducer = kWaveTransducer(kgrid, transducer);&#60;/p&#62;
&#60;p&#62;% print out transducer properties&#60;br /&#62;
transducer.properties;&#60;br /&#62;
transducer.plot;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
