<?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: rps pressure of HIFU within a layered tissues</title>
		<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 22:27:09 +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/rps-pressure-of-hifu-within-a-layered-tissues" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6127</link>
			<pubDate>Wed, 06 Sep 2017 11:36:16 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6127@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi tahere,&#60;/p&#62;
&#60;p&#62;It's not a quick fix, but I'd recommend spending some time reading through the k-Wave user manual, and working through the k-Wave examples from the beginning. This should answer all your queries. After that, if you get stuck on something in particular, let us know.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tahere on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6124</link>
			<pubDate>Wed, 06 Sep 2017 08:27:59 +0000</pubDate>
			<dc:creator>tahere</dc:creator>
			<guid isPermaLink="false">6124@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hi again.i wnat to know the rms pressure duo to a transducer in a homogeneous tissue.for different excitation frequency of transducer in a homogeneous medium should i change the medium.alpha_coeff proportional to excitation frequency?for example for excitation frequency values equal to 1Mhz and 2Mhz should i vary the medium.alpha_coeff from .7 to 1.4?&#60;br /&#62;
any help would be appreciated
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tahere on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6123</link>
			<pubDate>Wed, 06 Sep 2017 06:55:51 +0000</pubDate>
			<dc:creator>tahere</dc:creator>
			<guid isPermaLink="false">6123@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hi every body .i have some question.&#60;br /&#62;
with constant values for medium.alpha_power and medium.alpha_coeff equal to 1.05 and .45 respectively.i see with increasing the frequency of source from .25 to 1.5 Mhz the maximum value of rms pressure increases while i expect with increasing the frequency of excitation the value of rms pressure decrease.where is the problem?&#60;br /&#62;
thanks in advance
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tahere on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6122</link>
			<pubDate>Tue, 05 Sep 2017 14:59:06 +0000</pubDate>
			<dc:creator>tahere</dc:creator>
			<guid isPermaLink="false">6122@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hello dear bradley.&#60;br /&#62;
i have a medium with attenuation coefficient equal to .7 db/cm/Mhz.how can i set this value in k wave?plaese help me.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6121</link>
			<pubDate>Sun, 03 Sep 2017 20:36:44 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6121@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi tahere,&#60;/p&#62;
&#60;p&#62;If I run your code, I get an error that the absorption coefficient &#60;code&#62;medium.alpha_coeff&#60;/code&#62; is not defined. &#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tahere on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6116</link>
			<pubDate>Tue, 29 Aug 2017 07:05:16 +0000</pubDate>
			<dc:creator>tahere</dc:creator>
			<guid isPermaLink="false">6116@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hello again.i'm sorry to bother you.&#60;br /&#62;
i have one more question.&#60;br /&#62;
i simulate a section of a HIFU.I want to know the pressure in xz and yz planes perpendicular to this section of HIFU.but i receive an error message.my code and error message is shown in the below:&#60;br /&#62;
%% matlab code&#60;br /&#62;
clc,clear all,close all;&#60;br /&#62;
%% h is  the HIFU aperture radius(in terms of points)&#60;br /&#62;
h=25;&#60;br /&#62;
%% simulation settings&#60;br /&#62;
DATA_CAST = 'single';       % set to 'single' or 'gpuArray-single' to speed up computations&#60;br /&#62;
MASK_PLANE = 'xz';          % set to 'yz' or 'xz' to generate the beam pattern in different planes&#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;br /&#62;
%% set total number of grid points not including the PML&#60;br /&#62;
Nx = 122- 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 122- 2*PML_Y_SIZE;     % [grid points]&#60;br /&#62;
Nz = 122- 2*PML_Z_SIZE;     % [grid points]&#60;/p&#62;
&#60;p&#62;%% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = 102e-3;                  % [m]&#60;br /&#62;
%% calculate the spacing between the grid points&#60;br /&#62;
dx = x/Nx;                  % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;br /&#62;
dz = dx;                    % [m]&#60;br /&#62;
%% create the k-space grid&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy, Nz, dz);&#60;br /&#62;
%% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1578*ones(Nx,Ny,Nz);%%speed of sound in liver&#60;br /&#62;
medium.density = 1050*ones(Nx,Ny,Nz);%density of liver&#60;br /&#62;
medium.alpha_power = 1.5;&#60;br /&#62;
medium.BonA =0;%medium is linear&#60;br /&#62;
%% create the time array&#60;br /&#62;
t_end =100e-6;%seecond&#60;br /&#62;
kgrid.t_array = makeTime(kgrid,medium.sound_speed,[], t_end);&#60;br /&#62;
%% HIFU generation with spheregen function&#60;br /&#62;
a=makeSphere(102,102,102,50);&#60;br /&#62;
a(:,:,h:end)=0;&#60;br /&#62;
a(1:41,:,:)=0;&#60;br /&#62;
a(61:102,:,:)=0;&#60;br /&#62;
voxelPlot(a);&#60;br /&#62;
source.p_mask=a;&#60;br /&#62;
%% define a time varying sinusoidal source&#60;br /&#62;
source_freq =25e4;       % [Hz]&#60;br /&#62;
source_mag = 0.5;           % [Pa]&#60;br /&#62;
source.p = source_mag*sin(2*pi*source_freq*kgrid.t_array);&#60;br /&#62;
%% filter the source to remove any high frequencies not supported by the grid&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;br /&#62;
%% define a sensor mask through the central plane&#60;br /&#62;
sensor.mask = zeros(Nx, Ny, Nz);&#60;br /&#62;
switch MASK_PLANE&#60;br /&#62;
    case 'yz'&#60;br /&#62;
        % define mask&#60;br /&#62;
        sensor.mask(Nx/2, :,:) = 1;&#60;br /&#62;
        % store y axis properties&#60;br /&#62;
        Nj = Ny;&#60;br /&#62;
        j_vec = kgrid.y_vec;&#60;br /&#62;
        j_label = 'y';&#60;/p&#62;
&#60;p&#62;    case 'xz'&#60;br /&#62;
        % define mask&#60;br /&#62;
        sensor.mask(:, Ny/2,:) = 1;&#60;br /&#62;
        % store z axis properties&#60;br /&#62;
        Nj = Nz;&#60;br /&#62;
        j_vec = kgrid.x_vec;&#60;br /&#62;
        j_label = 'x';&#60;/p&#62;
&#60;p&#62;end&#60;br /&#62;
%% set the record mode such that only the rms and peak values are stored&#60;br /&#62;
sensor.record = {'p_rms'};&#60;br /&#62;
voxelPlot(sensor.mask);&#60;br /&#62;
%%set the input settings&#60;br /&#62;
input_args = {'DisplayMask',source.p_mask,'PlotLayout',true,'PMLInside', false, 'PlotPML',true, 'PMLSize', [PML_X_SIZE, PML_Y_SIZE, PML_Z_SIZE], ...&#60;br /&#62;
    'DataCast', DATA_CAST, 'DataRecast', true, 'PlotScale', [-source_mag/2,source_mag/2]};&#60;br /&#62;
%% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium,source, sensor, input_args{:});&#60;br /&#62;
%% reshape the returned rms and max fields to their original position&#60;br /&#62;
sensor_data.p_rms = reshape(sensor_data.p_rms, [Nj,Nz]);&#60;br /&#62;
%% plot the beam pattern using the pressure rms&#60;br /&#62;
figure;&#60;br /&#62;
imagesc(j_vec*1e3, (kgrid.z_vec - min(kgrid.z_vec(:)))*1e3, sensor_data.p_rms');&#60;br /&#62;
xlabel([j_label '-position [mm]']);&#60;br /&#62;
ylabel('z-position [mm]');&#60;br /&#62;
title('Total Beam Pattern Using RMS Of Recorded Pressure');&#60;br /&#62;
colormap(jet(256));&#60;br /&#62;
c = colorbar;&#60;br /&#62;
ylabel(c, 'Pressure [Pa]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;%%error message&#60;br /&#62;
Error using set&#60;br /&#62;
Bad property value found.&#60;br /&#62;
Object Name :  axes&#60;br /&#62;
Property Name : 'CLim'&#60;br /&#62;
Values must be increasing and non-NaN.&#60;/p&#62;
&#60;p&#62;Error in imagesc (line 47)&#60;br /&#62;
  set(cax,'CLim',clim)&#60;/p&#62;
&#60;p&#62;Error in kspaceFirstOrder3D&#38;gt;planeplot (line 1229)&#60;br /&#62;
subplot(2, 2, 1), imagesc(y_vec, x_vec, squeeze(data(:, :, round(end/2))),&#60;br /&#62;
plot_scale);&#60;/p&#62;
&#60;p&#62;Error in kspaceFirstOrder_plotLayout (line 179)&#60;br /&#62;
            planeplot(scale*kgrid.x_vec(x1:x2), scale*kgrid.y_vec(y1:y2),&#60;br /&#62;
            scale*kgrid.z_vec(z1:z2), double(c(x1:x2, y1:y2, z1:z2)), 'c: ',&#60;br /&#62;
            [plot_zlim(1) - plot_spc*plot_rng, plot_zlim(2) + plot_spc*p&#60;br /&#62;
Error in kspaceFirstOrder3D (line 689)&#60;br /&#62;
    kspaceFirstOrder_plotLayout;&#60;/p&#62;
&#60;p&#62;Error in liversade (line 110)&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium,source, sensor, input_args{:});
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tahere on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6115</link>
			<pubDate>Mon, 28 Aug 2017 13:26:17 +0000</pubDate>
			<dc:creator>tahere</dc:creator>
			<guid isPermaLink="false">6115@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hello dear professor.thanks for your fast answering.i have modeled a layered tissue with different sound speed,density and attenuation coefficient in 3 dimensional in front of a HIFU transducer.i obtain the rms pressure in the xz and yz planes perpendicular of HIFU.I have some questions.&#60;br /&#62;
1)the t_end time doesn't affect rms pressure'value?&#60;br /&#62;
2)I can reach the intensity with below formula:&#60;br /&#62;
intensity=(rms pressure)^2/2*acoustic impedance.&#60;br /&#62;
the formula between acoustic radiation force(ARF) and intensity is given as below:&#60;br /&#62;
f=2*absorption coefficient*I/sound speed.&#60;br /&#62;
 how can i obtain ARF when i put different values for different layer in my simulation.&#60;br /&#62;
thanks for your answering in advance
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6114</link>
			<pubDate>Wed, 23 Aug 2017 19:50:19 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6114@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi tahere,&#60;/p&#62;
&#60;p&#62;I'm not sure I follow what your question is. What do you mean when you say you didn't get the answer?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tahere on "rps pressure of HIFU within a layered tissues"</title>
			<link>http://www.k-wave.org/forum/topic/rps-pressure-of-hifu-within-a-layered-tissues#post-6107</link>
			<pubDate>Tue, 22 Aug 2017 08:12:33 +0000</pubDate>
			<dc:creator>tahere</dc:creator>
			<guid isPermaLink="false">6107@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hi every one.i want to obtain the rms pressure of a HIFU with continuous excitation  in the plane perpendicular to HIFU but i didnt get answer.the medium which i simulated consist of fat ,muscle,rib and liver.here is my code.i appreciate any help.i am looking forward getting answer from you as soon as possible.thanks in advance.&#60;/p&#62;
&#60;p&#62;clear all;&#60;br /&#62;
h=50;&#60;br /&#62;
% simulation settings&#60;br /&#62;
DATA_CAST = 'single';       % set to 'single' or 'gpuArray-single' to speed up computations&#60;br /&#62;
MASK_PLANE = 'yz';          % set to 'xy' or 'xz' to generate the beam pattern in different planes&#60;br /&#62;
USE_STATISTICS = true;      % set to true to compute the rms or peak beam patterns, set to false to compute the harmonic beam patterns&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE K-WAVE GRID&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#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 = 170- 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 170- 2*PML_Y_SIZE;     % [grid points]&#60;br /&#62;
Nz = 170- 2*PML_Z_SIZE;     % [grid points]&#60;/p&#62;
&#60;p&#62;% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = 15e-2;                  % [m]&#60;/p&#62;
&#60;p&#62;% calculate the spacing between the grid points&#60;br /&#62;
dx = x/Nx;                  % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;br /&#62;
dz = dx;                    % [m]&#60;/p&#62;
&#60;p&#62;% create the k-space grid&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy, Nz, dz);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE MEDIUM PARAMETERS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1578*ones(Nx,Ny,Nz);      % [m/s]&#60;br /&#62;
medium.sound_speed (:,:,1:h)=1430;&#60;br /&#62;
medium.sound_speed (:,:,h:h+10)=1430;&#60;br /&#62;
medium.sound_speed (:,:,h+10:h+30)=1580;&#60;br /&#62;
medium.sound_speed (:,:,h+20:h+30)=1580;&#60;br /&#62;
medium.sound_speed (:,1:10,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,20:30,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,40:50,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,60:70,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,80:90,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,100:110,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,120:130,h+20:h+30)=3198;&#60;br /&#62;
medium.sound_speed (:,140:150,h+20:h+30)=3198;&#60;br /&#62;
medium.density = 1050*ones(Nx,Ny,Nz);          % [kg/m^3]&#60;br /&#62;
medium.density(:,:,1:h)=928;&#60;br /&#62;
medium.density(:,:,h:h+10)=928;&#60;br /&#62;
medium.density(:,:,h+10:h+30)=1041;&#60;br /&#62;
medium.density(:,1:10,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,20:30,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,40:50,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,60:70,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,80:90,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,100:110,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,120:130,h+20:h+30)=1990;&#60;br /&#62;
medium.density(:,140:150,h+20:h+30)=1990;&#60;br /&#62;
medium.alpha_coeff = 0.45*ones(Nx,Ny,Nz);      % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_coeff (:,:,1:h)=.6;&#60;br /&#62;
medium.alpha_coeff (:,:,h:h+10)=.6;&#60;br /&#62;
medium.alpha_coeff (:,:,h+10:h+30)=.6;&#60;br /&#62;
medium.alpha_coeff (:,1:10,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,20:30,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,40:50,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,60:70,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,80:90,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,100:110,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,120:130,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_coeff (:,140:150,h+20:h+30)=3.54;&#60;br /&#62;
medium.alpha_power = 1.5;&#60;br /&#62;
medium.BonA =0;&#60;br /&#62;
dt_stability_limit = checkStability(kgrid, medium);&#60;br /&#62;
% create the time array&#60;br /&#62;
t_end =15e-6;                  % [s]&#60;br /&#62;
kgrid.t_array = makeTime(kgrid,medium.sound_speed,.1, t_end);&#60;br /&#62;
% DEFINE THE ULTRASOUND TRANSDUCER&#60;br /&#62;
% define a curved transducer element&#60;/p&#62;
&#60;p&#62; b=spheregen(h);&#60;br /&#62;
 source.p_mask=b;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% define a time varying sinusoidal source&#60;br /&#62;
source_freq = 1e6;       % [Hz]&#60;br /&#62;
source_mag = 0.5;           % [Pa]&#60;br /&#62;
source.p = source_mag*sin(2*pi*source_freq*kgrid.t_array);&#60;/p&#62;
&#60;p&#62;% filter the source to remove any high frequencies not supported by the grid&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% DEFINE SENSOR MASK&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define a sensor mask through the central plane&#60;br /&#62;
sensor.mask = zeros(Nx, Ny, Nz);&#60;br /&#62;
switch MASK_PLANE&#60;br /&#62;
    case 'yz'&#60;br /&#62;
        % define mask&#60;br /&#62;
        sensor.mask(Nx/2, :,:) = 1;&#60;/p&#62;
&#60;p&#62;        % store y axis properties&#60;br /&#62;
        Nj = Ny;&#60;br /&#62;
        j_vec = kgrid.y_vec;&#60;br /&#62;
        j_label = 'y';&#60;/p&#62;
&#60;p&#62;    case 'xz'&#60;br /&#62;
        % define mask&#60;br /&#62;
        sensor.mask(:, Ny/2, :) = 1;&#60;/p&#62;
&#60;p&#62;        % store z axis properties&#60;br /&#62;
        Nj = Nz;&#60;br /&#62;
        j_vec = kgrid.z_vec;&#60;br /&#62;
        j_label = 'z';&#60;/p&#62;
&#60;p&#62;end &#60;/p&#62;
&#60;p&#62;% set the record mode such that only the rms and peak values are stored&#60;br /&#62;
if USE_STATISTICS&#60;br /&#62;
    sensor.record = {'p_rms'};&#60;br /&#62;
end&#60;br /&#62;
voxelPlot(sensor.mask);&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% RUN THE SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% set the input settings&#60;br /&#62;
input_args = {'PlotLayout',true,'PMLInside', false, 'PlotPML',true, 'PMLSize', [PML_X_SIZE, PML_Y_SIZE, PML_Z_SIZE], ...&#60;br /&#62;
    'DataCast', DATA_CAST, 'DataRecast', true, 'PlotScale', [-source_mag/2,source_mag/2]};&#60;/p&#62;
&#60;p&#62;% stream the data to disk in blocks of 100 if storing the complete time&#60;br /&#62;
% history&#60;br /&#62;
if ~USE_STATISTICS&#60;br /&#62;
    input_args = [input_args {'StreamToDisk', 100}];&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium,source, sensor, input_args{:});&#60;br /&#62;
% voxelPlot(double(source.p_mask &#124; cart2grid(kgrid, sensor.mask)));&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% COMPUTE THE BEAM PATTERN USING SIMULATION STATISTICS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;if USE_STATISTICS&#60;/p&#62;
&#60;p&#62;    % reshape the returned rms and max fields to their original position&#60;br /&#62;
    sensor_data.p_rms = reshape(sensor_data.p_rms, [Nx, Nj]);&#60;/p&#62;
&#60;p&#62;    % plot the beam pattern using the pressure rms&#60;br /&#62;
    figure;&#60;br /&#62;
    imagesc(j_vec*1e3, (kgrid.x_vec - min(kgrid.x_vec(:)))*1e3, sensor_data.p_rms/1e6);&#60;br /&#62;
    xlabel([j_label '-position [mm]']);&#60;br /&#62;
    ylabel('x-position [mm]');&#60;br /&#62;
    title('Total Beam Pattern Using RMS Of Recorded Pressure');&#60;br /&#62;
    colormap(jet(256));&#60;br /&#62;
    c = colorbar;&#60;br /&#62;
    ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
    axis image;&#60;/p&#62;
&#60;p&#62;    % end the example&#60;br /&#62;
    return&#60;/p&#62;
&#60;p&#62;end&#60;/p&#62;
&#60;p&#62;%%below function creates HIFU with different radius&#60;/p&#62;
&#60;p&#62;function [a] = sphreregen(h)&#60;br /&#62;
a=makeSphere(150,150,150,50);&#60;br /&#62;
b=zeros(size(a));&#60;br /&#62;
for i=1:101&#60;br /&#62;
    b(:,:,i)=a(:,:,24+i);&#60;br /&#62;
end&#60;br /&#62;
b(:,:,h:end)=0;&#60;br /&#62;
voxelPlot(b);&#60;br /&#62;
end
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
