<?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: How to define pressure waves for multiple sources</title>
		<link>http://www.k-wave.org/forum/topic/how-to-define-pressure-waves-for-multiple-sources</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:08:27 +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/how-to-define-pressure-waves-for-multiple-sources" rel="self" type="application/rss+xml" />

		<item>
			<title>maren on "How to define pressure waves for multiple sources"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-define-pressure-waves-for-multiple-sources#post-148</link>
			<pubDate>Thu, 12 May 2011 15:27:35 +0000</pubDate>
			<dc:creator>maren</dc:creator>
			<guid isPermaLink="false">148@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;br /&#62;
many thanks for your response and also for making this work public,&#60;br /&#62;
it s pretty clear to me now,&#60;br /&#62;
best,&#60;br /&#62;
georgios
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "How to define pressure waves for multiple sources"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-define-pressure-waves-for-multiple-sources#post-146</link>
			<pubDate>Wed, 11 May 2011 23:29:10 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">146@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Georgios,&#60;/p&#62;
&#60;p&#62;Thanks for your question. Matrices in MATLAB are actually stored in memory as a one-dimensional sequence of numbers. The numbers are stored column by column moving top to bottom and left to right. Instead of using the row and column index to access a particular position in a matrix, we can also use its position in this sequence (this is called the linear index). From the &#60;a href=&#34;http://www.mathworks.com/help/techdoc/math/f1-85462.html&#34;&#62;MATLAB documentation&#60;/a&#62;:&#60;/p&#62;
&#60;p&#62;&#34;Matrix A&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;A = [2 6 9; 4 2 8; 3 5 1]
A =
     2     6     9
     4     2     8
     3     5     1&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;is actually stored in memory as the sequence&#60;/p&#62;
&#60;p&#62;&#60;code&#62;2, 4, 3, 6, 2, 5, 9, 8, 1&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;The element at row 3, column 2 of matrix A (value = 5) can also be identified as element 6 in the actual storage sequence. To access this element, you have a choice of using the standard A(3,2) syntax, or you can use A(6), which is referred to as linear indexing.&#34;&#60;/p&#62;
&#60;p&#62;This ordering is used to order the source points (and the sensor points) in k-Wave. For example, if your binary mask for &#60;code&#62;source.p_mask&#60;/code&#62; was equal to a circle:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;source.p_mask =
     0     1     0
     1     0     1
     1     0     1
     0     1     0&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The actual ordering of the source points would follow:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;source.p_mask =
     0     3     0
     1     0     5
     2     0     6
     0     4     0&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This is the ordering used in assigning the source terms to &#60;code&#62;source.p&#60;/code&#62; etc.&#60;/p&#62;
&#60;p&#62;I hope that helps - let me know if you still have any questions. We will work on making the documentation clearer for the next release.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>maren on "How to define pressure waves for multiple sources"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-define-pressure-waves-for-multiple-sources#post-144</link>
			<pubDate>Wed, 11 May 2011 14:55:16 +0000</pubDate>
			<dc:creator>maren</dc:creator>
			<guid isPermaLink="false">144@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
I am having some difficulty understanding how k-Wave handles different time varying pressures for different sources. Assuming I have 8 sources distributed circularly in the grid, I need to define 8 different pressure signals, one for each source. This I have done by making source.p a (number_of_sources)x(length(kgrid.t_array)) array.&#60;br /&#62;
Given that sources are defined just by 1 s on the grid array (there is no ordering), I am having some problem understanding how can I match the rows of the source.p array to the actual sources on the grid. To put it more simply, how does the software know which source signal corresponds to each source?&#60;br /&#62;
In the documentation it is mentioned that source.p can be &#34; a matrix of time series following the source elements using MATLAB's standard column-wise linear matrix index ordering&#34; which I am finding hard to decipher.&#60;br /&#62;
Any help would be greatly appreciated as I am stuck on this for a couple of days.&#60;br /&#62;
best regards,&#60;br /&#62;
georgios
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
