<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: EditorMacro &#8211; assign a keyboard macro in the Matlab editor	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=editormacro-assign-a-keyboard-macro-in-the-matlab-editor</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Mon, 26 Oct 2009 03:28:58 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Jason McMains		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3509</link>

		<dc:creator><![CDATA[Jason McMains]]></dc:creator>
		<pubDate>Mon, 26 Oct 2009 03:28:58 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3509</guid>

					<description><![CDATA[in any version specific code I&#039;ve written, I had actually accounted for the 7.0.1 issue by taking only the first 3 characters max, which would give me 7.0 or 7.5 etc. I had just heavily simplified for posting. so really line 2 should read:
&lt;pre lang=&quot;matlab&quot;&gt;
if str2double(Mversion.Version(1:min([3 end])) &gt;= 7
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>in any version specific code I&#8217;ve written, I had actually accounted for the 7.0.1 issue by taking only the first 3 characters max, which would give me 7.0 or 7.5 etc. I had just heavily simplified for posting. so really line 2 should read:</p>
<pre lang="matlab">
if str2double(Mversion.Version(1:min([3 end])) >= 7
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike Katz		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3439</link>

		<dc:creator><![CDATA[Mike Katz]]></dc:creator>
		<pubDate>Fri, 23 Oct 2009 15:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3439</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3438&quot;&gt;Yair Altman&lt;/a&gt;.

True. It&#039;s on the file exchange for that purpose, but I understand. Just wanted to point it out, though.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3438">Yair Altman</a>.</p>
<p>True. It&#8217;s on the file exchange for that purpose, but I understand. Just wanted to point it out, though.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3438</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 23 Oct 2009 14:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3438</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3437&quot;&gt;Mike Katz&lt;/a&gt;.

Unfortunately Mike, &lt;b&gt;&lt;i&gt;varLessThan&lt;/i&gt;&lt;/b&gt; was only introduced in recent Matlab releases, so if I have an older release I would get an error. Which brings me back to try/catch which works for &lt;u&gt;all&lt;/u&gt; Matlab releases :-)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3437">Mike Katz</a>.</p>
<p>Unfortunately Mike, <b><i>varLessThan</i></b> was only introduced in recent Matlab releases, so if I have an older release I would get an error. Which brings me back to try/catch which works for <u>all</u> Matlab releases 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike Katz		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3437</link>

		<dc:creator><![CDATA[Mike Katz]]></dc:creator>
		<pubDate>Fri, 23 Oct 2009 14:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3437</guid>

					<description><![CDATA[..forgot to mention that to @Jason that str2double is dangerous b/c some versions of MATLAB such as R14SP1 don&#039;t have straightfoward numbers, it&#039;s 7.0.1]]></description>
			<content:encoded><![CDATA[<p>..forgot to mention that to @Jason that str2double is dangerous b/c some versions of MATLAB such as R14SP1 don&#8217;t have straightfoward numbers, it&#8217;s 7.0.1</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mike Katz		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3436</link>

		<dc:creator><![CDATA[Mike Katz]]></dc:creator>
		<pubDate>Fri, 23 Oct 2009 14:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3436</guid>

					<description><![CDATA[RE: the try/catch case, the &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/verlessthan.html&quot; rel=&quot;nofollow&quot;&gt;verLessThan&lt;/a&gt; function is meant to address providing version-dependent behavior.]]></description>
			<content:encoded><![CDATA[<p>RE: the try/catch case, the <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/verlessthan.html" rel="nofollow">verLessThan</a> function is meant to address providing version-dependent behavior.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3420</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 22 Oct 2009 23:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3420</guid>

					<description><![CDATA[Andrey - you are correct: try-catch should be used, but excessive use has drawbacks. I guess this is true for most things in life... As elsewhere, there isn&#039;t a clear-cut definition of how much is &quot;just right&quot; - we should all apply judgment and common-sense.]]></description>
			<content:encoded><![CDATA[<p>Andrey &#8211; you are correct: try-catch should be used, but excessive use has drawbacks. I guess this is true for most things in life&#8230; As elsewhere, there isn&#8217;t a clear-cut definition of how much is &#8220;just right&#8221; &#8211; we should all apply judgment and common-sense.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrey		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-3386</link>

		<dc:creator><![CDATA[Andrey]]></dc:creator>
		<pubDate>Wed, 21 Oct 2009 12:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-3386</guid>

					<description><![CDATA[Yair Hi!

There are also some reasons why using try-catch isn&#039;t good in this case

1) &lt;b&gt;Simple Code &lt;/b&gt;  - The code is harder to understand. 
2) &lt;b&gt;Debugging&lt;/b&gt;  - When using try-catch without taking a look at the caught exception, you might miss an error which isn&#039;t related to Matlab version at all. Since you catch it, you will never see the stack in Matlab.
3) &lt;b&gt;Case handling &lt;/b&gt; - You will eventually need another try-catch for the matlab 6 section, to handle other versions (not 6 or 7). So what you get is basically a lot of recursive try-catch, which makes the code even less understandable.]]></description>
			<content:encoded><![CDATA[<p>Yair Hi!</p>
<p>There are also some reasons why using try-catch isn&#8217;t good in this case</p>
<p>1) <b>Simple Code </b>  &#8211; The code is harder to understand.<br />
2) <b>Debugging</b>  &#8211; When using try-catch without taking a look at the caught exception, you might miss an error which isn&#8217;t related to Matlab version at all. Since you catch it, you will never see the stack in Matlab.<br />
3) <b>Case handling </b> &#8211; You will eventually need another try-catch for the matlab 6 section, to handle other versions (not 6 or 7). So what you get is basically a lot of recursive try-catch, which makes the code even less understandable.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: EditorMacro v2 - setting Command Window key-bindings &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-2225</link>

		<dc:creator><![CDATA[EditorMacro v2 - setting Command Window key-bindings &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Fri, 21 Aug 2009 08:35:58 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-2225</guid>

					<description><![CDATA[[...] The EditorMacro utility was extended to support built-in Matlab Editor and Command-Window actions and key-bindings. This post describes the changes and the implementation details. [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] The EditorMacro utility was extended to support built-in Matlab Editor and Command-Window actions and key-bindings. This post describes the changes and the implementation details. [&#8230;]</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-1801</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 17 Jul 2009 14:01:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-1801</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-1752&quot;&gt;Neil&lt;/a&gt;.

@Neil - In answer to your question, I posted a follow-up: http://undocumentedmatlab.com/blog/non-textual-editor-actions/

Removing text can be done using hDocument.delete(startPos,endPos)

Enjoy :-)
Yair]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-1752">Neil</a>.</p>
<p>@Neil &#8211; In answer to your question, I posted a follow-up: <a href="http://undocumentedmatlab.com/blog/non-textual-editor-actions/" rel="ugc">http://undocumentedmatlab.com/blog/non-textual-editor-actions/</a></p>
<p>Removing text can be done using hDocument.delete(startPos,endPos)</p>
<p>Enjoy 🙂<br />
Yair</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Neil		</title>
		<link>https://undocumentedmatlab.com/articles/editormacro-assign-a-keyboard-macro-in-the-matlab-editor#comment-1752</link>

		<dc:creator><![CDATA[Neil]]></dc:creator>
		<pubDate>Tue, 14 Jul 2009 20:29:35 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=437#comment-1752</guid>

					<description><![CDATA[Great post -- one step closer into the black hole void of the matlab gui. Do you know of any way of running commands other than inserting text, for example, moving the cursor, deleting a word/line, or more dynamic text editing?

n]]></description>
			<content:encoded><![CDATA[<p>Great post &#8212; one step closer into the black hole void of the matlab gui. Do you know of any way of running commands other than inserting text, for example, moving the cursor, deleting a word/line, or more dynamic text editing?</p>
<p>n</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
