<?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: Minor Usability Enhancement for kspaceFirstOrder2D.m</title>
		<link>http://www.k-wave.org/forum/topic/minor-usability-enhancement-for-kspacefirstorder2dm</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 03:11:41 +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/minor-usability-enhancement-for-kspacefirstorder2dm" rel="self" type="application/rss+xml" />

		<item>
			<title>antares on "Minor Usability Enhancement for kspaceFirstOrder2D.m"</title>
			<link>http://www.k-wave.org/forum/topic/minor-usability-enhancement-for-kspacefirstorder2dm#post-6973</link>
			<pubDate>Thu, 11 Jul 2019 19:26:10 +0000</pubDate>
			<dc:creator>antares</dc:creator>
			<guid isPermaLink="false">6973@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi all,&#60;/p&#62;
&#60;p&#62;during simulation, I like to use the waiting time for looking at plots from earlier runs, editing them, etc. Unfortunately, the running simulation plots into the current figure, such that the next update is included there. It is relatively easy to change this, such that the simulation update sticks to its own figure, regardless of other interactive work. Just replace this block (line 918):&#60;/p&#62;
&#60;p&#62;            % update plot&#60;br /&#62;
            imagesc(kgrid.y_vec(y1:y2) * scale, kgrid.x_vec(x1:x2) * scale, p_plot, plot_scale);&#60;br /&#62;
            colormap(COLOR_MAP);&#60;br /&#62;
            ylabel(['x-position [' prefix 'm]']);&#60;br /&#62;
            xlabel(['y-position [' prefix 'm]']);&#60;br /&#62;
            axis image;&#60;/p&#62;
&#60;p&#62;With this block:&#60;/p&#62;
&#60;p&#62;            if t_index == 1&#60;br /&#62;
                % create plot&#60;br /&#62;
                imagehandle = imagesc(kgrid.y_vec(y1:y2) * scale, kgrid.x_vec(x1:x2) * scale, p_plot, plot_scale);&#60;br /&#62;
                colormap(COLOR_MAP);&#60;br /&#62;
                ylabel(['x-position [' prefix 'm]']);&#60;br /&#62;
                xlabel(['y-position [' prefix 'm]']);&#60;br /&#62;
                axis image;&#60;br /&#62;
            else&#60;br /&#62;
                % update plot&#60;br /&#62;
                set(imagehandle, 'CData', p_plot)&#60;br /&#62;
            end&#60;/p&#62;
&#60;p&#62;It does exactly the same during the first plot (plot creation), but for subsequent plots, the handle to the data is used to replace the data only. This means that the plot itself with its object structure is preserved, also making the run faster by 1% for my typical use-cases. I donate this code to the project.&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
Heinrich
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
