<?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: spectrum function error in ultrasound beam patterns example.</title>
		<link>http://www.k-wave.org/forum/topic/spectrum-function-error-in-ultrasound-beam-patterns-example</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:34:30 +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/spectrum-function-error-in-ultrasound-beam-patterns-example" rel="self" type="application/rss+xml" />

		<item>
			<title>acegi70 on "spectrum function error in ultrasound beam patterns example."</title>
			<link>http://www.k-wave.org/forum/topic/spectrum-function-error-in-ultrasound-beam-patterns-example#post-469</link>
			<pubDate>Fri, 20 Apr 2012 01:36:06 +0000</pubDate>
			<dc:creator>acegi70</dc:creator>
			<guid isPermaLink="false">469@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Great. It works now! Thank you very much for your quick reply.&#60;/p&#62;
&#60;p&#62;Jun
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "spectrum function error in ultrasound beam patterns example."</title>
			<link>http://www.k-wave.org/forum/topic/spectrum-function-error-in-ultrasound-beam-patterns-example#post-468</link>
			<pubDate>Fri, 20 Apr 2012 01:02:29 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">468@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi acegi70,&#60;/p&#62;
&#60;p&#62;This error appears to come from a naming conflict between the &#60;code&#62;spectrum&#60;/code&#62; function in the k-Wave toolbox, and the &#60;code&#62;spectrum&#60;/code&#62; function in the signal processing toolbox. We'll consider changing the name for future releases, but as a work around you could try either:&#60;/p&#62;
&#60;p&#62;(1) Renaming the &#60;code&#62;spectrum&#60;/code&#62; function in the toolbox to &#60;code&#62;kspectrum&#60;/code&#62;, and then changing the line of the code in the example to call &#60;code&#62;kspectrum&#60;/code&#62; instead.&#60;/p&#62;
&#60;p&#62;(2) Copying the &#60;code&#62;spectrum.m&#60;/code&#62; file into the examples folder to see if that forces the k-Wave function to take precedence.&#60;/p&#62;
&#60;p&#62;I hope you can get it working!&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>acegi70 on "spectrum function error in ultrasound beam patterns example."</title>
			<link>http://www.k-wave.org/forum/topic/spectrum-function-error-in-ultrasound-beam-patterns-example#post-467</link>
			<pubDate>Fri, 20 Apr 2012 00:06:02 +0000</pubDate>
			<dc:creator>acegi70</dc:creator>
			<guid isPermaLink="false">467@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I just found out about k-wave and am just trying to learn it by looking at some of the examples on my mac OsX Lion.&#60;br /&#62;
One thing I looked into was the &#34;Simulating ultrasound beam patterns&#34; example. If I run this, it works fine. However, I wanted to look at the fundamental and harmonic beam profiles and so I set USE_STATISTICS = fase; and ran the example again. Doing this gave me an error message as shown below:&#60;/p&#62;
&#60;p&#62;Warning: SPECTRUM is obsolete and will be removed in future versions.  Use&#60;br /&#62;
the spectrum objects instead, type &#34;help SPECTRUM&#34;.&#60;br /&#62;
&#38;gt; In spectrum at 103&#60;br /&#62;
Warning: Rounding order to nearest integer.&#60;br /&#62;
&#38;gt; In signal/private/check_order at 28&#60;br /&#62;
  In hanning at 25&#60;br /&#62;
  In spectrum&#38;gt;specchk at 321&#60;br /&#62;
  In spectrum at 106&#60;br /&#62;
Error using spectrum&#38;gt;specchk (line 398)&#60;br /&#62;
Requires positive integer values for NFFT and NOVERLAP.&#60;/p&#62;
&#60;p&#62;Error in spectrum (line 106)&#60;br /&#62;
[x,y,nfft,noverlap,window,Fs,p,dflag]=specchk(varargin);&#60;/p&#62;
&#60;p&#62;It seems that the error is generated by the &#34;spectrum&#34; function and I was wondering if anyone could suggest how to go about fixing this issue. Thank you.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
