<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matthias Pospiech</title>
	<atom:link href="http://www.matthiaspospiech.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthiaspospiech.de</link>
	<description></description>
	<lastBuildDate>Sun, 14 Apr 2013 08:11:17 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>waitbar with cancel button</title>
		<link>http://www.matthiaspospiech.de/blog/2013/03/01/waitbar-with-cancel-button/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=waitbar-with-cancel-button</link>
		<comments>http://www.matthiaspospiech.de/blog/2013/03/01/waitbar-with-cancel-button/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 11:18:46 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[waitbar]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=709</guid>
		<description><![CDATA[The following code is an example for a loop function with a waitbar that allows canceling of the loop with the cancel button: Note however that a waitbar consumes very much time. Depending on the code this can slow down the calculation significantly. if numel&#40;indices&#41; &#62; 1 hWait = waitbar&#40;0,'1', ... 'Name','Exporting Plots ...', ... [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2007/06/07/set-radio-button-at-runtime/' rel='bookmark' title='Set Radio Button at runtime'>Set Radio Button at runtime</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[The following code is an example for a loop function with a waitbar that allows canceling of the loop with the cancel button:

Note however that a waitbar consumes very much time. Depending on the code this can slow down the calculation <a href="http://www.matlabtips.com/waiting-for-the-waitbar/" class="liexternal">significantly</a>.


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">if</span> numel<span style="color: #080;">&#40;</span>indices<span style="color: #080;">&#41;</span> &gt; <span style="color: #33f;">1</span>
    hWait = <span style="color: #0000FF;">waitbar</span><span style="color: #080;">&#40;</span><span style="color: #33f;">0</span>,<span style="color:#A020F0;">'1'</span>, <span style="color: #080;">...</span>
            <span style="color:#A020F0;">'Name'</span>,<span style="color:#A020F0;">'Exporting Plots ...'</span>, <span style="color: #080;">...</span>
            <span style="color:#A020F0;">'CreateCancelBtn'</span>, <span style="color: #080;">...</span>
            <span style="color:#A020F0;">'setappdata(gcbf,'</span><span style="color:#A020F0;">'canceling'</span><span style="color:#A020F0;">',1)'</span><span style="color: #080;">&#41;</span>;
    cleanupWaitbar = onCleanup<span style="color: #080;">&#40;</span> @<span style="color: #080;">&#40;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#40;</span> <span style="color: #0000FF;">delete</span><span style="color: #080;">&#40;</span> hWait <span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
    setappdata<span style="color: #080;">&#40;</span>hWait,<span style="color:#A020F0;">'canceling'</span>,<span style="color: #33f;">0</span><span style="color: #080;">&#41;</span>;    
<span style="color: #0000FF;">else</span>
    hWait = <span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span>;
<span style="color: #0000FF;">end</span>
&nbsp;
<span style="color: #0000FF;">for</span> k = indices            
    <span style="color: #0000FF;">if</span> getappdata<span style="color: #080;">&#40;</span>hWait,<span style="color:#A020F0;">'canceling'</span><span style="color: #080;">&#41;</span>
        <span style="color: #0000FF;">break</span>
    <span style="color: #0000FF;">end</span>
&nbsp;
    <span style="color: #0000FF;">if</span> ~isempty<span style="color: #080;">&#40;</span>hWait<span style="color: #080;">&#41;</span>
        waitStr = <span style="color: #080;">&#91;</span><span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>k<span style="color: #080;">&#41;</span> <span style="color:#A020F0;">' / '</span> <span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span>numel<span style="color: #080;">&#40;</span>indices<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span>;
        <span style="color: #0000FF;">waitbar</span><span style="color: #080;">&#40;</span>k/numel<span style="color: #080;">&#40;</span>indices<span style="color: #080;">&#41;</span>,hWait,waitStr<span style="color: #080;">&#41;</span>;
    <span style="color: #0000FF;">end</span>
&nbsp;
    plotData<span style="color: #080;">&#40;</span>data<span style="color: #080;">&#123;</span>k<span style="color: #080;">&#125;</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">end</span></pre></td></tr></table></div>


<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2007/06/07/set-radio-button-at-runtime/' rel='bookmark' title='Set Radio Button at runtime'>Set Radio Button at runtime</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2013/03/01/waitbar-with-cancel-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>radiobuttons in a buttongroup</title>
		<link>http://www.matthiaspospiech.de/blog/2013/03/01/radiobuttons-in-a-buttongroup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=radiobuttons-in-a-buttongroup</link>
		<comments>http://www.matthiaspospiech.de/blog/2013/03/01/radiobuttons-in-a-buttongroup/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 10:29:26 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[gui]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=707</guid>
		<description><![CDATA[In matlab one has to place radiobuttons in a uibuttongroup to make them exclusively selectable. In the startup of the gui one can select the default selection and define a callback function set&#40;handles.uibuttongroupView, 'SelectedObject', handles.radiobuttonPlotROI&#41;; set&#40;handles.uibuttongroupView, 'SelectionChangeFcn',@uibuttongroupView_SelectionChangeFcn&#41;; The callback function then looks like function uibuttongroupView_SelectionChangeFcn&#40;hObject, eventdata, handles&#41; % hObject handle to the selected object in [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/' rel='bookmark' title='check if gui selection has changed'>check if gui selection has changed</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/' rel='bookmark' title='matlab popupmenu (combobox)'>matlab popupmenu (combobox)</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/plotting-a-filled-curve/' rel='bookmark' title='plotting a filled curve'>plotting a filled curve</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[In matlab one has to place radiobuttons in a <a href="http://www.mathworks.de/de/help/matlab/ref/uibuttongroup.html" class="liexternal">uibuttongroup</a> to make them exclusively selectable.

In the startup of the gui one can select the default selection and define a callback function


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>handles.<span style="">uibuttongroupView</span>, <span style="color:#A020F0;">'SelectedObject'</span>, handles.<span style="">radiobuttonPlotROI</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>handles.<span style="">uibuttongroupView</span>, <span style="color:#A020F0;">'SelectionChangeFcn'</span>,@uibuttongroupView_SelectionChangeFcn<span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>




The callback function then looks like


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">function</span> uibuttongroupView_SelectionChangeFcn<span style="color: #080;">&#40;</span>hObject, eventdata, handles<span style="color: #080;">&#41;</span>
<span style="color: #228B22;">% hObject    handle to the selected object in uibuttongroupView </span>
<span style="color: #228B22;">% eventdata  structure with the following fields (see UIBUTTONGROUP)</span>
<span style="color: #228B22;">%	EventName: string 'SelectionChanged' (read only)</span>
<span style="color: #228B22;">%	OldValue: handle of the previously selected object or empty if none was selected</span>
<span style="color: #228B22;">%	NewValue: handle of the currently selected object</span>
<span style="color: #228B22;">% handles    structure with handles and user data (see GUIDATA)</span>
&nbsp;
handles=guidata<span style="color: #080;">&#40;</span>hObject<span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">if</span> <span style="color: #080;">&#40;</span>~<span style="color: #0000FF;">strcmp</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>eventdata.<span style="">NewValue</span>,<span style="color:#A020F0;">'Tag'</span><span style="color: #080;">&#41;</span>, <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>eventdata.<span style="">OldValue</span>,<span style="color:#A020F0;">'Tag'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
    <span style="color: #0000FF;">switch</span> <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>eventdata.<span style="">NewValue</span>,<span style="color:#A020F0;">'Tag'</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;">% Get Tag of selected object.</span>
        <span style="color: #0000FF;">case</span> <span style="color:#A020F0;">'radiobuttonPlotROI'</span>
&nbsp;
        <span style="color: #0000FF;">case</span> <span style="color:#A020F0;">'radiobuttonPlotCalibration'</span>
&nbsp;
        <span style="color: #0000FF;">otherwise</span>
            <span style="color: #228B22;">% Code for when there is no match.</span>
    <span style="color: #0000FF;">end</span>
<span style="color: #0000FF;">end</span></pre></td></tr></table></div>




The current selection can in any gui function be retrieved using he following code,
which will get the current tag as a string.


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;">currRadioButton = <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>handles.<span style="">uibuttongroupView</span>, <span style="color:#A020F0;">'SelectedObject'</span><span style="color: #080;">&#41;</span>, <span style="color:#A020F0;">'Tag'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>


<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/' rel='bookmark' title='check if gui selection has changed'>check if gui selection has changed</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/' rel='bookmark' title='matlab popupmenu (combobox)'>matlab popupmenu (combobox)</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/plotting-a-filled-curve/' rel='bookmark' title='plotting a filled curve'>plotting a filled curve</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2013/03/01/radiobuttons-in-a-buttongroup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>enable zoom in gui</title>
		<link>http://www.matthiaspospiech.de/blog/2013/03/01/enable-zoom-in-gui/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=enable-zoom-in-gui</link>
		<comments>http://www.matthiaspospiech.de/blog/2013/03/01/enable-zoom-in-gui/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 10:17:44 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=704</guid>
		<description><![CDATA[Matlab provides the function of making axes zoomable in a gui (zoom reference). In a matlab gui this is enable by using this code: hZoom = zoom; setAllowAxesZoom&#40;hZoom,handles.axes,true&#41;; set&#40;hZoom,'Motion','both','Enable','on'&#41;;<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/' rel='bookmark' title='check if gui selection has changed'>check if gui selection has changed</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/' rel='bookmark' title='matlab popupmenu (combobox)'>matlab popupmenu (combobox)</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2010/12/16/plotting-tutorials/' rel='bookmark' title='plotting tutorials'>plotting tutorials</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[Matlab provides the function of making axes zoomable in a gui (<a href="http://www.mathworks.de/de/help/matlab/ref/zoom.html" class="liexternal">zoom reference</a>). 
In a matlab gui this is enable by using this code:


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;">hZoom = <span style="color: #0000FF;">zoom</span>;
setAllowAxesZoom<span style="color: #080;">&#40;</span>hZoom,handles.<span style="color: #0000FF;">axes</span>,true<span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hZoom,<span style="color:#A020F0;">'Motion'</span>,<span style="color:#A020F0;">'both'</span>,<span style="color:#A020F0;">'Enable'</span>,<span style="color:#A020F0;">'on'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>


<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/' rel='bookmark' title='check if gui selection has changed'>check if gui selection has changed</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/' rel='bookmark' title='matlab popupmenu (combobox)'>matlab popupmenu (combobox)</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2010/12/16/plotting-tutorials/' rel='bookmark' title='plotting tutorials'>plotting tutorials</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2013/03/01/enable-zoom-in-gui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>change extension of filename</title>
		<link>http://www.matthiaspospiech.de/blog/2013/02/13/change-extension-of-filename/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=change-extension-of-filename</link>
		<comments>http://www.matthiaspospiech.de/blog/2013/02/13/change-extension-of-filename/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 08:42:55 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=699</guid>
		<description><![CDATA[Very often I tend to save the results of a file under the same name, but with a modified extension. This code shows how to achieve this % change extension &#91;~, ~, ext&#93; = fileparts&#40;FileName&#41;; FileName = strrep&#40;FileName, ext, '-xyz.png'&#41;; If the file should be saved under a different folder it needs to be created [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/fast-reading-of-structured-text-data-with-matlab/' rel='bookmark' title='fast reading of structured text data with matlab'>fast reading of structured text data with matlab</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/plotting-a-filled-curve/' rel='bookmark' title='plotting a filled curve'>plotting a filled curve</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2007/07/21/mediawiki-plugins/' rel='bookmark' title='Mediawiki Plugins'>Mediawiki Plugins</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[Very often I tend to save the results of a file under the same name, but with a modified extension. This code shows how to achieve this


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">% change extension</span>
<span style="color: #080;">&#91;</span>~, ~, ext<span style="color: #080;">&#93;</span> = <span style="color: #0000FF;">fileparts</span><span style="color: #080;">&#40;</span>FileName<span style="color: #080;">&#41;</span>;
FileName = <span style="color: #0000FF;">strrep</span><span style="color: #080;">&#40;</span>FileName, ext, <span style="color:#A020F0;">'-xyz.png'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>




If the file should be saved under a different folder it needs to be created and the file name changed accordingly


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #080;">&#91;</span>filepath, filename, ext<span style="color: #080;">&#93;</span> = <span style="color: #0000FF;">fileparts</span><span style="color: #080;">&#40;</span>FileName<span style="color: #080;">&#41;</span>;
FileName = <span style="color: #0000FF;">fullfile</span><span style="color: #080;">&#40;</span>filepath, <span style="color:#A020F0;">'results'</span>,  <span style="color: #080;">&#91;</span>filename, ext<span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
fullpath = <span style="color: #0000FF;">fullfile</span><span style="color: #080;">&#40;</span>filepath, <span style="color:#A020F0;">'results'</span><span style="color: #080;">&#41;</span>;
createDir<span style="color: #080;">&#40;</span>fullpath<span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>




Where <code>createDir</code> is the following function


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">function</span> createDir<span style="color: #080;">&#40;</span>pathstr<span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">if</span><span style="color: #080;">&#40;</span>~<span style="color: #0000FF;">exist</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span>pathstr<span style="color: #080;">&#93;</span>, <span style="color:#A020F0;">'dir'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
    <span style="color: #0000FF;">mkdir</span><span style="color: #080;">&#40;</span>pathstr<span style="color: #080;">&#41;</span>
<span style="color: #0000FF;">end</span></pre></td></tr></table></div>



<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/fast-reading-of-structured-text-data-with-matlab/' rel='bookmark' title='fast reading of structured text data with matlab'>fast reading of structured text data with matlab</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/plotting-a-filled-curve/' rel='bookmark' title='plotting a filled curve'>plotting a filled curve</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2007/07/21/mediawiki-plugins/' rel='bookmark' title='Mediawiki Plugins'>Mediawiki Plugins</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2013/02/13/change-extension-of-filename/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>check if gui selection has changed</title>
		<link>http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=check-if-gui-selection-has-changed</link>
		<comments>http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 09:21:35 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[ABCD]]></category>
		<category><![CDATA[gui]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=696</guid>
		<description><![CDATA[The callback of an ui element is called whenever the element has been modified. However this does not necessarily mean that the value of the element has changed. Here is an example where an action is only performed if the value has changed. The trick is to use a value variable with persistent. function popupmenuAlgorithm_Callback&#40;hObject, [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/fast-reading-of-structured-text-data-with-matlab/' rel='bookmark' title='fast reading of structured text data with matlab'>fast reading of structured text data with matlab</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/' rel='bookmark' title='matlab popupmenu (combobox)'>matlab popupmenu (combobox)</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2007/06/07/check-value-of-radiobutton/' rel='bookmark' title='Check value of Radiobutton'>Check value of Radiobutton</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>The callback of an ui element is called whenever the element has been modified. However this does not necessarily mean that the value of the element has changed.</p>
<p>Here is an example where an action is only performed if the value has changed. The trick is to use a value variable with <code>persistent</code>.</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">function</span> popupmenuAlgorithm_Callback<span style="color: #080;">&#40;</span>hObject, eventdata, handles<span style="color: #080;">&#41;</span>
<span style="color: #228B22;">% hObject    handle to popupmenuAlgorithm (see GCBO)</span>
<span style="color: #228B22;">% eventdata  reserved - to be defined in a future version of MATLAB</span>
<span style="color: #228B22;">% handles    structure with handles and user data (see GUIDATA)</span>
&nbsp;
<span style="color: #0000FF;">persistent</span> lastValue;
&nbsp;
<span style="color: #0000FF;">if</span> <span style="color: #080;">&#40;</span>lastValue ~= <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>hObject,<span style="color:#A020F0;">'Value'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>
    handles.<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'status'</span><span style="color: #080;">&#41;</span>.<span style="color: #080;">&#40;</span><span style="color:#A020F0;">'doCalibrationUpdate'</span><span style="color: #080;">&#41;</span> = true;
<span style="color: #0000FF;">end</span>
lastValue = <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>hObject,<span style="color:#A020F0;">'Value'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>


<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/31/fast-reading-of-structured-text-data-with-matlab/' rel='bookmark' title='fast reading of structured text data with matlab'>fast reading of structured text data with matlab</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/' rel='bookmark' title='matlab popupmenu (combobox)'>matlab popupmenu (combobox)</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2007/06/07/check-value-of-radiobutton/' rel='bookmark' title='Check value of Radiobutton'>Check value of Radiobutton</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2013/02/05/check-if-gui-selection-has-changed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>matlab popupmenu (combobox)</title>
		<link>http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=matlab-popupmenu-combobox</link>
		<comments>http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 11:19:06 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[combobox]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[popupmenu]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=693</guid>
		<description><![CDATA[The popupmenu of the matlab gui is based on the uicontrol class. Below is a sample code for its usage: % create text entries in menu colormapStr&#123;1&#125;= 'blue-red'; colormapStr&#123;2&#125;= 'red-blue'; colormapStr&#123;3&#125;= 'gray'; set&#40;handles.popupmenuColorMap, 'String',colormapStr,'value',1&#41;; &#160; % get current selection of menu ColorMapContents = cellstr&#40;get&#40;handles.popupmenuColorMap,'String'&#41;&#41;; ColormapSelect = ColorMapContents&#123;get&#40;handles.popupmenuColorMap, 'value'&#41;&#125;; &#160; % select an action switch ColormapSelect [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2012/03/11/pcolor-and-contour-plot-with-different-colormaps/' rel='bookmark' title='pcolor and contour plot with different colormaps'>pcolor and contour plot with different colormaps</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/06/01/pcolor-plots-with-publication-ready-formating/' rel='bookmark' title='pcolor plots with publication ready formating'>pcolor plots with publication ready formating</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2010/10/11/matlab-figures-solving-export-problems/' rel='bookmark' title='Matlab figures &#8211; solving export problems'>Matlab figures &#8211; solving export problems</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[The <em>popupmenu</em> of the matlab gui is based on the <a href="http://www.mathworks.de/de/help/matlab/ref/uicontrol.html" class="liexternal">uicontrol</a> class. Below is a sample code for its usage:


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">% create text entries in menu</span>
colormapStr<span style="color: #080;">&#123;</span><span style="color: #33f;">1</span><span style="color: #080;">&#125;</span>= <span style="color:#A020F0;">'blue-red'</span>;
colormapStr<span style="color: #080;">&#123;</span><span style="color: #33f;">2</span><span style="color: #080;">&#125;</span>= <span style="color:#A020F0;">'red-blue'</span>;
colormapStr<span style="color: #080;">&#123;</span><span style="color: #33f;">3</span><span style="color: #080;">&#125;</span>= <span style="color:#A020F0;">'gray'</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>handles.<span style="">popupmenuColorMap</span>, <span style="color:#A020F0;">'String'</span>,colormapStr,<span style="color:#A020F0;">'value'</span>,<span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">% get current selection of menu</span>
ColorMapContents = <span style="color: #0000FF;">cellstr</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>handles.<span style="">popupmenuColorMap</span>,<span style="color:#A020F0;">'String'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
ColormapSelect = ColorMapContents<span style="color: #080;">&#123;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>handles.<span style="">popupmenuColorMap</span>, <span style="color:#A020F0;">'value'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#125;</span>;
&nbsp;
<span style="color: #228B22;">% select an action</span>
<span style="color: #0000FF;">switch</span> ColormapSelect
    <span style="color: #0000FF;">case</span> <span style="color:#A020F0;">'blue-red'</span>
        cmap = <span style="color: #0000FF;">fliplr</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">jet</span><span style="color: #080;">&#40;</span>colorDepth<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
        <span style="color: #0000FF;">colormap</span><span style="color: #080;">&#40;</span>cmap<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span>:<span style="color: #33f;">800</span>,:<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
    <span style="color: #0000FF;">case</span> <span style="color:#A020F0;">'red-blue'</span>
        <span style="color: #0000FF;">colormap</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">jet</span><span style="color: #080;">&#40;</span>colorDepth<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>; 
    <span style="color: #0000FF;">case</span> <span style="color:#A020F0;">'gray'</span>
        <span style="color: #0000FF;">colormap</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gray</span><span style="color: #080;">&#40;</span>colorDepth<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>; 
<span style="color: #0000FF;">end</span></pre></td></tr></table></div>


<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2012/03/11/pcolor-and-contour-plot-with-different-colormaps/' rel='bookmark' title='pcolor and contour plot with different colormaps'>pcolor and contour plot with different colormaps</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/06/01/pcolor-plots-with-publication-ready-formating/' rel='bookmark' title='pcolor plots with publication ready formating'>pcolor plots with publication ready formating</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2010/10/11/matlab-figures-solving-export-problems/' rel='bookmark' title='Matlab figures &#8211; solving export problems'>Matlab figures &#8211; solving export problems</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2013/01/25/matlab-popupmenu-combobox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ein paar Tage in Dresden</title>
		<link>http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ein-paar-tage-in-dresden</link>
		<comments>http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/#comments</comments>
		<pubDate>Tue, 28 Aug 2012 19:44:56 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[Holidays]]></category>
		<category><![CDATA[Privat]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=665</guid>
		<description><![CDATA[Mitte August waren wir ein paar Tage in Dresden und haben uns die Altstadt, Semper Oper, Frauenkirche, Schloss Pillnitz und die S&#228;chsische Schweiz angeschaut. Wir haben in der Neustadt in der N&#228;he des goldenen Reiters gewohnt und sind Abends h&#228;ufig in der &#228;u&#223;eren Neustadt gewesen. Sehr zu empfehlen ist das Thalia Kino, wo man auch [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2009/10/29/chilis-2009/' rel='bookmark' title='Chilis 2009'>Chilis 2009</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2007/09/28/chilies/' rel='bookmark' title='Chilies'>Chilies</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Mitte August waren wir ein paar Tage in Dresden und haben uns die Altstadt, Semper Oper, Frauenkirche, Schloss Pillnitz und die S&#228;chsische Schweiz angeschaut.</p>

<p>Wir haben in der Neustadt in der N&#228;he des goldenen Reiters gewohnt und sind Abends h&#228;ufig in der &#228;u&#223;eren Neustadt gewesen. Sehr zu empfehlen ist das <a href="http://thalia-dresden.de/" class="liexternal">Thalia Kino</a>, wo man auch sehr gut was trinken kann, wenn man Jazz Musik mag das <a href="http://www.jazzdepartment.com/" class="liexternal">Blue Note</a> und zum Wein oder Cocktails trinken  die StudioBar. Alles &#252;brigens nur 10 Meter voneinander entfernt. Im weiteren Umkreis gibt es noch viele weitere Bars und Restaurants und jede Menge Studenten &#8230; </p>

<!--TOC-->
<ol class="toc-generator"><li><a href="#toc-altstadt" title="Jump to Altstadt">Altstadt</a></li><li><a href="#toc-frauenkirche" title="Jump to Frauenkirche">Frauenkirche</a></li><li><a href="#toc-semper-oper" title="Jump to Semper Oper">Semper Oper</a></li><li><a href="#toc-nachts" title="Jump to Nachts">Nachts</a></li><li><a href="#toc-schsische-schweiz" title="Jump to S&#228;chsische Schweiz">S&#228;chsische Schweiz</a></li><li><a href="#toc-schloss-pillnitz" title="Jump to Schloss Pillnitz">Schloss Pillnitz</a></li></ol>
<h3 id="toc-altstadt">Altstadt</h3>
<div class="ngg-galleryoverview" id="ngg-gallery-47-665">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/nggallery/slideshow">
			[Zeige als Diashow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-240" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/web-dsc_0011.jpg" title=" "  >
								<img title="web-dsc_0011" alt="web-dsc_0011" src="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/thumbs/thumbs_web-dsc_0011.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-241" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/web-dsc_0019.jpg" title=" "  >
								<img title="web-dsc_0019" alt="web-dsc_0019" src="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/thumbs/thumbs_web-dsc_0019.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-242" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/web-dsc_0030.jpg" title=" "  >
								<img title="web-dsc_0030" alt="web-dsc_0030" src="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/thumbs/thumbs_web-dsc_0030.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-244" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/web-dsc_0144.jpg" title=" "  >
								<img title="web-dsc_0144" alt="web-dsc_0144" src="http://www.matthiaspospiech.de/files/gallery/dresden-altstadt/thumbs/thumbs_web-dsc_0144.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<h4 id="toc-frauenkirche">Frauenkirche</h4>
<p>Die Frauenkirche ist von innen h&#252;bsch bunt, und fast kitschig. Es wird kein Eintritt genommen, so dass der Innenraum mit Menschen gef&#252;llt ist. Eigentlich darf man nicht fotografieren, aber das habe ich wie hunderte anderer einfach ignoriert.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-48-665">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/nggallery/slideshow">
			[Zeige als Diashow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-245" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-frauenkirche/web-dsc_0002.jpg" title=" "  >
								<img title="web-dsc_0002" alt="web-dsc_0002" src="http://www.matthiaspospiech.de/files/gallery/dresden-frauenkirche/thumbs/thumbs_web-dsc_0002.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-246" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-frauenkirche/web-dsc_0131.jpg" title=" "  >
								<img title="web-dsc_0131" alt="web-dsc_0131" src="http://www.matthiaspospiech.de/files/gallery/dresden-frauenkirche/thumbs/thumbs_web-dsc_0131.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-247" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-frauenkirche/web-dsc_0133.jpg" title=" "  >
								<img title="web-dsc_0133" alt="web-dsc_0133" src="http://www.matthiaspospiech.de/files/gallery/dresden-frauenkirche/thumbs/thumbs_web-dsc_0133.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<h4 id="toc-semper-oper">Semper Oper</h4>
<p>Die Semper Oper ist &#228;hnlich wie die Frauenkirche vollst&#228;ndig restauriert worden. Die gesamten Marmor- und Holznachbildungen an den W&#228;nden sind von Restauratoren in den letzten Jahrzehnten fertig gestellt worde.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-49-665">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/nggallery/slideshow">
			[Zeige als Diashow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-256" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/web-dsc_0077.jpg" title=" "  >
								<img title="web-dsc_0077" alt="web-dsc_0077" src="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/thumbs/thumbs_web-dsc_0077.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-252" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/web-dsc_0085.jpg" title=" "  >
								<img title="web-dsc_0085" alt="web-dsc_0085" src="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/thumbs/thumbs_web-dsc_0085.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-253" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/web-dsc_0089.jpg" title=" "  >
								<img title="web-dsc_0089" alt="web-dsc_0089" src="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/thumbs/thumbs_web-dsc_0089.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-254" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/web-dsc_0090.jpg" title=" "  >
								<img title="web-dsc_0090" alt="web-dsc_0090" src="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/thumbs/thumbs_web-dsc_0090.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-255" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/web-dsc_0092.jpg" title=" "  >
								<img title="web-dsc_0092" alt="web-dsc_0092" src="http://www.matthiaspospiech.de/files/gallery/dresden-semperoper/thumbs/thumbs_web-dsc_0092.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<h4 id="toc-nachts">Nachts</h4>
<p>Die meisten Bilder bei Nacht sind leider nichts geworden. Ich hatte zwar ein lichtstarkes Objektiv dabei und konnte mit unter 3200 ISO bei 1/30 Fotos machen, aber mir war nicht klar das Nachts ein Autofokus nur Mist misst. Das die Bilder unscharf sind ist mir leider erst am Computer klar geworden. Zum dem haben einige Bilder ein deutliches Rauschen. Beim n&#228;chsten Mal dann mit Stativ, geringer ISO Zahl, langen Belichtungszeiten und Blende 8 (damit die Lampen nicht so ausfransen).<p>

<p>Das erste Bild zeigt &#252;brigens ein Konzert der &#196;rzte. Die Livemusik war von unserem Standpunkt (von der Br&#252;cke) aus allerdings miserable, da der Ton von beiden Seiten der Elbe reflektiert wurde und wir jeden Ton mit dreifachem Hall h&#246;ren konnten.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-50-665">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/nggallery/slideshow">
			[Zeige als Diashow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-257" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/altstadt-nachts/web-dsc_0065.jpg" title=" "  >
								<img title="web-dsc_0065" alt="web-dsc_0065" src="http://www.matthiaspospiech.de/files/gallery/altstadt-nachts/thumbs/thumbs_web-dsc_0065.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-258" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/altstadt-nachts/web-dsc_0068.jpg" title=" "  >
								<img title="web-dsc_0068" alt="web-dsc_0068" src="http://www.matthiaspospiech.de/files/gallery/altstadt-nachts/thumbs/thumbs_web-dsc_0068.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-259" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/altstadt-nachts/web-dsc_0148.jpg" title=" "  >
								<img title="web-dsc_0148" alt="web-dsc_0148" src="http://www.matthiaspospiech.de/files/gallery/altstadt-nachts/thumbs/thumbs_web-dsc_0148.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<h3 id="toc-schsische-schweiz">S&#228;chsische Schweiz</h3>
<p>Wir sind von Wehlen Richtung Bastei gelaufen und hinter der Felsenburg Richtung Rathen wieder runtergegangen. Den Weg von Rathen hochzulaufen k&#246;nnen wir nicht empfehlen. Zuviele Touristen und zu Steil &#8211; fast nur Treppen auf der gesamten Strecke.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-51-665">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/nggallery/slideshow">
			[Zeige als Diashow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-260" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0111.jpg" title=" "  >
								<img title="web-dsc_0111" alt="web-dsc_0111" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0111.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-262" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0116.jpg" title=" "  >
								<img title="web-dsc_0116" alt="web-dsc_0116" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0116.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-266" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0126.jpg" title=" "  >
								<img title="web-dsc_0126" alt="web-dsc_0126" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0126.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-263" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0118.jpg" title=" "  >
								<img title="web-dsc_0118" alt="web-dsc_0118" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0118.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-264" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0128.jpg" title=" "  >
								<img title="web-dsc_0128" alt="web-dsc_0128" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0128.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-265" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0130.jpg" title=" "  >
								<img title="web-dsc_0130" alt="web-dsc_0130" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0130.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-261" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/web-dsc_0112.jpg" title=" "  >
								<img title="web-dsc_0112" alt="web-dsc_0112" src="http://www.matthiaspospiech.de/files/gallery/dresden-sachsschweiz/thumbs/thumbs_web-dsc_0112.jpg" width="100" height="48" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<h3 id="toc-schloss-pillnitz">Schloss Pillnitz</h3>
<p>Zum Schluss haben wir uns noch das Schloss Pillnitz angeschaut. Das Schloss selber ist von innen eher uninteressant, hat aber einen sch&#246;nen Garten.</p>
<div class="ngg-galleryoverview" id="ngg-gallery-52-665">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/nggallery/slideshow">
			[Zeige als Diashow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-267" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0157.jpg" title=" "  >
								<img title="web-dsc_0157" alt="web-dsc_0157" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0157.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-268" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0158.jpg" title=" "  >
								<img title="web-dsc_0158" alt="web-dsc_0158" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0158.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-269" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0160.jpg" title=" "  >
								<img title="web-dsc_0160" alt="web-dsc_0160" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0160.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-270" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0161.jpg" title=" "  >
								<img title="web-dsc_0161" alt="web-dsc_0161" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0161.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-271" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0177.jpg" title=" "  >
								<img title="web-dsc_0177" alt="web-dsc_0177" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0177.jpg" width="100" height="66" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-272" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0183.jpg" title=" "  >
								<img title="web-dsc_0183" alt="web-dsc_0183" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0183.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-273" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/web-dsc_0185.jpg" title=" "  >
								<img title="web-dsc_0185" alt="web-dsc_0185" src="http://www.matthiaspospiech.de/files/gallery/dresden-pillnitz/thumbs/thumbs_web-dsc_0185.jpg" width="49" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2009/10/29/chilis-2009/' rel='bookmark' title='Chilis 2009'>Chilis 2009</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2007/09/28/chilies/' rel='bookmark' title='Chilies'>Chilies</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2012/08/28/ein-paar-tage-in-dresden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX-Einf&#252;hrung</title>
		<link>http://www.matthiaspospiech.de/blog/2012/05/13/latex-einfuhrung/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=latex-einfuhrung</link>
		<comments>http://www.matthiaspospiech.de/blog/2012/05/13/latex-einfuhrung/#comments</comments>
		<pubDate>Sun, 13 May 2012 17:46:32 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Einführung]]></category>
		<category><![CDATA[Vortrag]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=659</guid>
		<description><![CDATA[Die folgenden Folien und &#220;bungen wurden in einer zweit&#228;gigen Einf&#252;hrung von LaTeX verwendet. Die Zielausrichtung lag auf der Erstellung von einfachen Protokollen mit Ausblicken auf Themen, die bei Bachelor und Masterarbeiten relevant sind. Die Inhalte entsprechen im Wesentlichen denen aus der letzen Einf&#252;hrung. Der gesamte Umfang betr&#228;gt ca. 6 Stunden inklusive der &#220;bungen. Um die [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/' rel='bookmark' title='LaTeX Einf&#252;hrung'>LaTeX Einf&#252;hrung</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/15/latex-vorlage-fuer-protokolle/' rel='bookmark' title='LaTeX-Vorlage f&#252;r Protokolle'>LaTeX-Vorlage f&#252;r Protokolle</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2012/02/06/latex-workshop/' rel='bookmark' title='LaTeX-Workshop'>LaTeX-Workshop</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Die folgenden Folien und &#220;bungen wurden in einer zweit&#228;gigen Einf&#252;hrung von LaTeX verwendet. Die Zielausrichtung lag auf der Erstellung von einfachen Protokollen mit Ausblicken auf Themen, die bei Bachelor und Masterarbeiten relevant sind.</p>
<ul>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
	<li>Note: There is a file embedded within this post, please visit this post to download the file.</li>
</ul>

<p>Die Inhalte entsprechen im Wesentlichen denen aus der <a href="/blog/2012/02/06/latex-workshop/" title="LaTeX-Einf&#252;hrung" class="liinternal">letzen Einf&#252;hrung</a>.</p>

<p>Der gesamte Umfang betr&#228;gt ca. 6 Stunden inklusive der &#220;bungen. Um die maximale Aufmerksamkeitszeitdauer von 3-4 Stunden nicht zu &#252;berziehen wurde der Workshop an zwei Tagen mit jeweils drei Stunden durchgef&#252;hrt.</p>

<p>Beim n&#228;chsten Mal w&#252;rde ich gerne noch die <a href="http://www.texdev.net/2011/03/24/texworks-magic-comments/" class="liexternal">magic comments</a> einf&#252;hren oder zumindest zeigen. Sie wurden nicht unbedingt ben&#246;tigt, aber ich habe sie in den Beispieldateien verwendet ohne sie zu erkl&#228;ren.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/15/latex-einfuehrung/' rel='bookmark' title='LaTeX Einf&#252;hrung'>LaTeX Einf&#252;hrung</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2011/05/15/latex-vorlage-fuer-protokolle/' rel='bookmark' title='LaTeX-Vorlage f&#252;r Protokolle'>LaTeX-Vorlage f&#252;r Protokolle</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2012/02/06/latex-workshop/' rel='bookmark' title='LaTeX-Workshop'>LaTeX-Workshop</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2012/05/13/latex-einfuhrung/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>pcolor and contour plot with different colormaps</title>
		<link>http://www.matthiaspospiech.de/blog/2012/03/11/pcolor-and-contour-plot-with-different-colormaps/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pcolor-and-contour-plot-with-different-colormaps</link>
		<comments>http://www.matthiaspospiech.de/blog/2012/03/11/pcolor-and-contour-plot-with-different-colormaps/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 18:25:18 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[colormap]]></category>
		<category><![CDATA[contour]]></category>
		<category><![CDATA[pcolor]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=647</guid>
		<description><![CDATA[Matlab does not allow to combine use more than one colormap in a figure. However there are some possibilities to get around this problem, which are presented in this article. Initilisation and export of figure For all plots the same initialisation for the data and the figure is used: % clear command window, figures and [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/06/01/pcolor-plots-with-publication-ready-formating/' rel='bookmark' title='pcolor plots with publication ready formating'>pcolor plots with publication ready formating</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2008/06/16/qwt-spectrogramm-plot-with-data-arrays/' rel='bookmark' title='qwt spectrogramm plot with data arrays'>qwt spectrogramm plot with data arrays</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2010/10/11/matlab-figures-solving-export-problems/' rel='bookmark' title='Matlab figures &#8211; solving export problems'>Matlab figures &#8211; solving export problems</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Matlab does not allow to combine use more than one colormap in a figure. However there are some possibilities to get around this problem, which are presented in this article.</p>

<!--TOC-->

<h3>Initilisation and export of figure</h3>
<p>For all plots the same initialisation for the data and the figure is used:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">% clear command window, figures and all variables</span>
<span style="color: #0000FF;">clc</span>; <span style="color: #0000FF;">clf</span>; <span style="color: #0000FF;">clear</span> <span style="color: #0000FF;">all</span>; 
&nbsp;
<span style="color: #228B22;">%% Common variables</span>
&nbsp;
FontSize = <span style="color: #33f;">12</span>;
FontName = <span style="color:#A020F0;">'MyriadPro-Regular'</span>; <span style="color: #228B22;">% or choose any other font</span>
&nbsp;
doExportPlot = true;
&nbsp;
<span style="color: #228B22;">%% Plot variables</span>
SaveDir = <span style="color:#A020F0;">''</span>;
&nbsp;
<span style="color: #0000FF;">TITLE</span> = <span style="color:#A020F0;">''</span>;
    xLabelText = <span style="color:#A020F0;">'x-values'</span>;
    yLabelText = <span style="color:#A020F0;">'y-values'</span>;
    zLabelText = <span style="color:#A020F0;">'function values'</span>;
&nbsp;
&nbsp;
<span style="color: #228B22;">%%</span>
SaveDir = <span style="color:#A020F0;">''</span>;
BaseDir = <span style="color:#A020F0;">''</span>;
<span style="color: #228B22;">%% Create Data</span>
<span style="color: #080;">&#91;</span>x y data<span style="color: #080;">&#93;</span> = <span style="color: #0000FF;">peaks</span><span style="color: #080;">&#40;</span><span style="color: #33f;">1000</span><span style="color: #080;">&#41;</span>;
data = data - <span style="color: #0000FF;">min</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">min</span><span style="color: #080;">&#40;</span>data<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
data = data / <span style="color: #0000FF;">max</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">max</span><span style="color: #080;">&#40;</span>data<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">%% start plot</span>
&nbsp;
<span style="color: #228B22;">% figure dimensions in cm. I choose 1.5 or 2 times </span>
<span style="color: #228B22;">% the target size typically. If figure is display in</span>
<span style="color: #228B22;">% document much smaller increase the fontsize.</span>
&nbsp;
figure_width = <span style="color: #33f;">14</span>;  
figure_height = <span style="color: #33f;">10</span>;
&nbsp;
<span style="color: #228B22;">% --- setup plot windows</span>
figuresVisible = <span style="color:#A020F0;">'on'</span>; <span style="color: #228B22;">% 'off' for non displayed plots (will still be exported)</span>
hfig = <span style="color: #0000FF;">figure</span><span style="color: #080;">&#40;</span><span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>; <span style="color: #0000FF;">clf</span>;
    <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hfig,<span style="color:#A020F0;">'Visible'</span>, figuresVisible<span style="color: #080;">&#41;</span>
&nbsp;
    <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hfig, <span style="color:#A020F0;">'units'</span>, <span style="color:#A020F0;">'centimeters'</span>, <span style="color:#A020F0;">'pos'</span>, <span style="color: #080;">&#91;</span><span style="color: #33f;">5</span> <span style="color: #33f;">5</span> figure_width figure_height<span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>   
    <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hfig, <span style="color:#A020F0;">'PaperPositionMode'</span>, <span style="color:#A020F0;">'auto'</span><span style="color: #080;">&#41;</span>;    
    <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hfig, <span style="color:#A020F0;">'Renderer'</span>,<span style="color:#A020F0;">'zbuffer'</span><span style="color: #080;">&#41;</span>; 
    <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hfig, <span style="color:#A020F0;">'Color'</span>, <span style="color: #080;">&#91;</span><span style="color: #33f;">1</span> <span style="color: #33f;">1</span> <span style="color: #33f;">1</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>; <span style="color: #228B22;">% Sets figure background</span>
    <span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gca</span>, <span style="color:#A020F0;">'Color'</span>, <span style="color: #080;">&#91;</span><span style="color: #33f;">1</span> <span style="color: #33f;">1</span> <span style="color: #33f;">1</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>; <span style="color: #228B22;">% Sets axes background</span>
&nbsp;
<span style="color: #228B22;">% --- dimensions and position of plot </span>
hsp = <span style="color: #0000FF;">subplot</span><span style="color: #080;">&#40;</span><span style="color: #33f;">1</span>,<span style="color: #33f;">1</span>,<span style="color: #33f;">1</span>, <span style="color:#A020F0;">'Parent'</span>, hfig<span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>hsp,<span style="color:#A020F0;">'Position'</span>,<span style="color: #080;">&#91;</span><span style="color: #33f;">0.12</span> <span style="color: #33f;">0.15</span> <span style="color: #33f;">0.80</span> <span style="color: #33f;">0.8</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
&nbsp;
colorDepth = <span style="color: #33f;">1000</span>;</pre></td></tr></table></div>




<p>And the same code is used to style the plot and export the figure:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">%%  setup axis plot properties</span>
<span style="color: #228B22;">% shading interp; % interpolate pixels</span>
<span style="color: #0000FF;">axis</span> on;      <span style="color: #228B22;">% display axis</span>
<span style="color: #0000FF;">axis</span> tight;   <span style="color: #228B22;">% no white borders</span>
&nbsp;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gca</span>, <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'Box'</span>         , <span style="color:#A020F0;">'on'</span>      , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'TickDir'</span>     , <span style="color:#A020F0;">'in'</span>      , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'TickLength'</span>  , <span style="color: #080;">&#91;</span>.02 .02<span style="color: #080;">&#93;</span> , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'XMinorTick'</span>  , <span style="color:#A020F0;">'off'</span>      , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'YMinorTick'</span>  , <span style="color:#A020F0;">'off'</span>     , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'XGrid'</span>       , <span style="color:#A020F0;">'off'</span>     , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'YGrid'</span>       , <span style="color:#A020F0;">'off'</span>     , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'XColor'</span>      , <span style="color: #080;">&#91;</span>.0 .0 .0<span style="color: #080;">&#93;</span>, <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'YColor'</span>      , <span style="color: #080;">&#91;</span>.0 .0 .0<span style="color: #080;">&#93;</span>, <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'LineWidth'</span>   , <span style="color: #33f;">0.6</span>        <span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">%% axis scales</span>
&nbsp;
<span style="color: #228B22;">% set(gca,'XTick',-15:5:15)</span>
<span style="color: #228B22;">% set(gca,'YTick',-10:5:10)</span>
&nbsp;
<span style="color: #228B22;">%% label texts</span>
&nbsp;
<span style="color: #228B22;">% save handles to set up label properties</span>
hTitle = <span style="color: #0000FF;">title</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">TITLE</span><span style="color: #080;">&#41;</span>;
hXLabel = <span style="color: #0000FF;">xlabel</span><span style="color: #080;">&#40;</span>xLabelText<span style="color: #080;">&#41;</span>;
hYLabel = <span style="color: #0000FF;">ylabel</span><span style="color: #080;">&#40;</span>yLabelText<span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">%% set properties for all handles</span>
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #080;">&#91;</span><span style="color: #0000FF;">gca</span>, hTitle, hXLabel, hYLabel<span style="color: #080;">&#93;</span>, <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'FontSize'</span>   , FontSize    , <span style="color: #080;">...</span>
    <span style="color:#A020F0;">'FontName'</span>   , FontName<span style="color: #080;">&#41;</span>;
&nbsp;
&nbsp;
<span style="color: #228B22;">%% last 'bug' fixes</span>
&nbsp;
<span style="color: #228B22;">% bring axis on top again (fix matlab bug)</span>
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gca</span>,<span style="color:#A020F0;">'Layer'</span>, <span style="color:#A020F0;">'top'</span><span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">%% export</span>
<span style="color: #0000FF;">drawnow</span>
&nbsp;
doExportPlot = true;
<span style="color: #0000FF;">if</span> <span style="color: #080;">&#40;</span>doExportPlot<span style="color: #080;">&#41;</span>
    IMAGENAME = <span style="color: #080;">&#91;</span>SaveDir SaveName<span style="color: #080;">&#93;</span>; 
    <span style="color: #0000FF;">print</span><span style="color: #080;">&#40;</span>hfig, <span style="color: #080;">&#91;</span><span style="color:#A020F0;">'-r'</span> <span style="color: #0000FF;">num2str</span><span style="color: #080;">&#40;</span><span style="color: #33f;">400</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span>, <span style="color: #080;">&#91;</span>IMAGENAME <span style="color:#A020F0;">'.png'</span> <span style="color: #080;">&#93;</span>, <span style="color: #080;">&#91;</span><span style="color:#A020F0;">'-d'</span> <span style="color:#A020F0;">'png'</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;    
<span style="color: #0000FF;">end</span></pre></td></tr></table></div>



<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/06/01/pcolor-plots-with-publication-ready-formating/' rel='bookmark' title='pcolor plots with publication ready formating'>pcolor plots with publication ready formating</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2008/06/16/qwt-spectrogramm-plot-with-data-arrays/' rel='bookmark' title='qwt spectrogramm plot with data arrays'>qwt spectrogramm plot with data arrays</a></li>
<li><a href='http://www.matthiaspospiech.de/blog/2010/10/11/matlab-figures-solving-export-problems/' rel='bookmark' title='Matlab figures &#8211; solving export problems'>Matlab figures &#8211; solving export problems</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2012/03/11/pcolor-and-contour-plot-with-different-colormaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>plotyy with unequal tick locations for both datasets</title>
		<link>http://www.matthiaspospiech.de/blog/2012/02/13/plotyy-with-unequal-tick-locations-for-both-datasets/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=plotyy-with-unequal-tick-locations-for-both-datasets</link>
		<comments>http://www.matthiaspospiech.de/blog/2012/02/13/plotyy-with-unequal-tick-locations-for-both-datasets/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 22:08:08 +0000</pubDate>
		<dc:creator>pospiech</dc:creator>
				<category><![CDATA[matlab]]></category>
		<category><![CDATA[matlab plot]]></category>

		<guid isPermaLink="false">http://www.matthiaspospiech.de/?p=635</guid>
		<description><![CDATA[In matlab the normal way to create plots with two y-axis is to use the command plotyy. This works quite simple, and creates equal tick locations for both data sets: xaxis = 0:0.1:25; y1 = linspace&#40;12.1712,12.7679, length&#40;xaxis&#41;&#41;; y2 = linspace&#40;0.3597,-28.7745, length&#40;xaxis&#41;&#41;; &#160; &#91;AX,H1,H2&#93; = plotyy&#40;xaxis, y1, xaxis, y2&#41;; &#160; plotstyle; % sets only colors, linestyle [...]<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/06/01/pcolor-plots-with-publication-ready-formating/' rel='bookmark' title='pcolor plots with publication ready formating'>pcolor plots with publication ready formating</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>In matlab the normal way to create plots with two y-axis is to use the command <code>plotyy</code>.</p>

<p>This works quite simple, and creates equal tick locations for both data sets:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;">xaxis = <span style="color: #33f;">0</span>:<span style="color: #33f;">0.1</span>:<span style="color: #33f;">25</span>;
y1 = <span style="color: #0000FF;">linspace</span><span style="color: #080;">&#40;</span><span style="color: #33f;">12.1712</span>,<span style="color: #33f;">12.7679</span>, <span style="color: #0000FF;">length</span><span style="color: #080;">&#40;</span>xaxis<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
y2 = <span style="color: #0000FF;">linspace</span><span style="color: #080;">&#40;</span><span style="color: #33f;">0.3597</span>,-<span style="color: #33f;">28.7745</span>, <span style="color: #0000FF;">length</span><span style="color: #080;">&#40;</span>xaxis<span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #080;">&#91;</span>AX,H1,H2<span style="color: #080;">&#93;</span> = <span style="color: #0000FF;">plotyy</span><span style="color: #080;">&#40;</span>xaxis, y1, xaxis, y2<span style="color: #080;">&#41;</span>;
&nbsp;
plotstyle; <span style="color: #228B22;">% sets only colors, linestyle and fonts</span></pre></td></tr></table></div>




<a href="http://www.matthiaspospiech.de/files/matlab/plotyy/plotyy01.png" class="liimagelink"><img src="http://www.matthiaspospiech.de/files/matlab/plotyy/plotyy01-300x230.png" alt="" title="plotyy01" width="300" height="230" class="alignnone size-medium wp-image-637" /></a>

<p>However for tick that are not equal on both sides the plot looks simply wrong.</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #080;">&#91;</span>AX,H1,H2<span style="color: #080;">&#93;</span> = <span style="color: #0000FF;">plotyy</span><span style="color: #080;">&#40;</span>xaxis, y1, xaxis, y2<span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">% axis limits - x axis (min to max)</span>
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>AX, <span style="color:#A020F0;">'XLim'</span>, <span style="color: #080;">&#91;</span><span style="color: #0000FF;">min</span><span style="color: #080;">&#40;</span>xaxis<span style="color: #080;">&#41;</span> <span style="color: #0000FF;">max</span><span style="color: #080;">&#40;</span>xaxis<span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>AX<span style="color: #080;">&#40;</span><span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'XTick'</span>,<span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">% y1 axis limits </span>
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>AX<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>, <span style="color:#A020F0;">'YLim'</span>, <span style="color: #080;">&#91;</span><span style="color: #0000FF;">min</span><span style="color: #080;">&#40;</span>y1<span style="color: #080;">&#41;</span> <span style="color: #0000FF;">max</span><span style="color: #080;">&#40;</span>y1<span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
&nbsp;
<span style="color: #228B22;">% y2 axis limits </span>
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>AX<span style="color: #080;">&#40;</span><span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>, <span style="color:#A020F0;">'YLim'</span>, <span style="color: #080;">&#91;</span><span style="color: #0000FF;">min</span><span style="color: #080;">&#40;</span>y2<span style="color: #080;">&#41;</span> <span style="color: #0000FF;">max</span><span style="color: #080;">&#40;</span>y2<span style="color: #080;">&#41;</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>;
&nbsp;
plotstyle;</pre></td></tr></table></div>




<a href="http://www.matthiaspospiech.de/files/plotyy02.png" class="liimagelink"><img src="http://www.matthiaspospiech.de/files/plotyy02-300x230.png" alt="" title="plotyy02" width="300" height="230" class="alignnone size-medium wp-image-639" /></a>

<p>Unfortunately the web is full of question on how to remove the ticks on the opposite side. But Matlab completely fails at this point. It is simply not supported properly.</p>

<p>The only solution I could find/retrieve in a <a href="http://mathworks.com/matlabcentral/answers/28752-plotyy-with-axis-for-each-plot-only-on-one-side" target="_blank" class="liexternal">forum</a> was the following one, which is based on the idea to remove the box property which paints the ticks on the opposite side. But it also removes the surrounding box, which is unwanted.</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>AX<span style="color: #080;">&#40;</span><span style="color: #33f;">1</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'Box'</span>,<span style="color:#A020F0;">'off'</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;">% Turn off box of axis 1, which removes its right-hand ticks</span>
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>AX<span style="color: #080;">&#40;</span><span style="color: #33f;">2</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'Box'</span>,<span style="color:#A020F0;">'off'</span><span style="color: #080;">&#41;</span> <span style="color: #228B22;">% Turn off box of axis 2, which removes its left-hand ticks</span></pre></td></tr></table></div>




<a href="http://www.matthiaspospiech.de/files/plotyy03.png" class="liimagelink"><img src="http://www.matthiaspospiech.de/files/plotyy03-300x230.png" alt="" title="plotyy03" width="300" height="230" class="alignnone size-medium wp-image-640" /></a>

<p>Another idea I found in this <a href="http://www.mathworks.com/matlabcentral/newsreader/view_thread/160515" class="liexternal">thread </a> is to work with dummy axes, 
but I do not see how to integrate it with my plot function (the plot is empy after I execute this code)</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">% dummy axes for the box and background color </span>
ax0 = <span style="color: #0000FF;">axes</span>; 
<span style="color: #0000FF;">set</span> <span style="color: #080;">&#40;</span>ax0, <span style="color:#A020F0;">'Box'</span>, <span style="color:#A020F0;">'on'</span>, <span style="color:#A020F0;">'Color'</span>, <span style="color:#A020F0;">'white'</span>, <span style="color:#A020F0;">'XTick'</span>, <span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span>, <span style="color:#A020F0;">'YTick'</span>, <span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span><span style="color: #080;">&#41;</span>; 
<span style="color: #228B22;">% first axes for left y-axis </span>
ax1 = <span style="color: #0000FF;">axes</span> <span style="color: #080;">&#40;</span><span style="color:#A020F0;">'Position'</span>, <span style="color: #0000FF;">get</span> <span style="color: #080;">&#40;</span>ax0, <span style="color:#A020F0;">'Position'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>; 
<span style="color: #0000FF;">set</span> <span style="color: #080;">&#40;</span>ax1, <span style="color:#A020F0;">'Box'</span>, <span style="color:#A020F0;">'off'</span>, <span style="color:#A020F0;">'Color'</span>, <span style="color:#A020F0;">'none'</span>, <span style="color:#A020F0;">'YAxisLocation'</span>, <span style="color:#A020F0;">'left'</span><span style="color: #080;">&#41;</span>; 
<span style="color: #228B22;">% second axes for right y-axis assuming common x-axis controlled by ax1 </span>
ax2 = <span style="color: #0000FF;">axes</span> <span style="color: #080;">&#40;</span><span style="color:#A020F0;">'Position'</span>, <span style="color: #0000FF;">get</span> <span style="color: #080;">&#40;</span>ax0, <span style="color:#A020F0;">'Position'</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>; 
<span style="color: #0000FF;">set</span> <span style="color: #080;">&#40;</span>ax2, <span style="color:#A020F0;">'Box'</span>, <span style="color:#A020F0;">'off'</span>, <span style="color:#A020F0;">'Color'</span>, <span style="color:#A020F0;">'none'</span>, <span style="color:#A020F0;">'XTick'</span>, <span style="color: #080;">&#91;</span><span style="color: #080;">&#93;</span>, <span style="color:#A020F0;">'YAxisLocation'</span>, <span style="color:#A020F0;">'right'</span><span style="color: #080;">&#41;</span>;</pre></td></tr></table></div>




<p>Any hints or other solutions are welcome. please use this thread on <a href="http://stackoverflow.com/questions/9239958/matlabs-plotyy-with-axis-for-each-plot-only-on-one-side/9240113" title="stackoverflow.com" target="_blank" class="liexternal">stackoverflow.com</a> for adding answers on your own.</p>

<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href='http://www.matthiaspospiech.de/blog/2011/06/01/pcolor-plots-with-publication-ready-formating/' rel='bookmark' title='pcolor plots with publication ready formating'>pcolor plots with publication ready formating</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.matthiaspospiech.de/blog/2012/02/13/plotyy-with-unequal-tick-locations-for-both-datasets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
