<?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: Vectorized goto in MATLAB</title>
	<atom:link href="http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Mon, 13 Feb 2012 13:24:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Husam Aldahiyat</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-32042</link>
		<dc:creator>Husam Aldahiyat</dc:creator>
		<pubDate>Wed, 16 Feb 2011 18:47:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-32042</guid>
		<description>Try this, not truly &#039;vectorized&#039;, but close enough. Not a joke either (well, mostly):

http://www.mathworks.com/matlabcentral/fileexchange/26949-vectorized-goto-statement</description>
		<content:encoded><![CDATA[<p>Try this, not truly &#8216;vectorized&#8217;, but close enough. Not a joke either (well, mostly):</p>
<p><a href="http://www.mathworks.com/matlabcentral/fileexchange/26949-vectorized-goto-statement" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/26949-vectorized-goto-statement</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-31331</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Mon, 10 May 2010 18:17:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-31331</guid>
		<description>Stumbled onto this today and I love the fact that after 4 years, users are still struggling with how to properly implement Matlab&#039;s goto command.  While I understand that documentation of the command is not great, I think Loren&#039;s thorough explanation above puts it within reach of common sense.

thanks Loren, this was just the help that I needed to get through a long afternoon.</description>
		<content:encoded><![CDATA[<p>Stumbled onto this today and I love the fact that after 4 years, users are still struggling with how to properly implement Matlab&#8217;s goto command.  While I understand that documentation of the command is not great, I think Loren&#8217;s thorough explanation above puts it within reach of common sense.</p>
<p>thanks Loren, this was just the help that I needed to get through a long afternoon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-31163</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:04:02 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-31163</guid>
		<description>Mark-

You&#039;ll have to keep waiting.  There&#039;s no current plan for introducing goto into MATLAB.

You&#039;d be better served by using existing constructs like break/continue in loops and putting common pieces of code into functions.

--Loren</description>
		<content:encoded><![CDATA[<p>Mark-</p>
<p>You&#8217;ll have to keep waiting.  There&#8217;s no current plan for introducing goto into MATLAB.</p>
<p>You&#8217;d be better served by using existing constructs like break/continue in loops and putting common pieces of code into functions.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark deyoung</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-31162</link>
		<dc:creator>mark deyoung</dc:creator>
		<pubDate>Wed, 17 Mar 2010 15:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-31162</guid>
		<description>It&#039;s 2010 and where is my beloved GOTO?

Using line numbers? If I insert a new line 1051... will my vector update automagically? If not, that&#039;s a seriously bad implementation from the standpoint of maintiability. 

Not a great idea from the standpoint of readability/maintainability... goto (line1051) may work but what does is mean? I have to goto line 1051 to figure that out.

What happened to the tried and true concept of using labels like 

&lt;pre&gt;
goto (GetUserInput)
&lt;/pre&gt;

I can construct workarounds the lack of a gotostatement , but why should I have to take the time and create structures that clutter my code to same something as simple and CLEAR as 

&lt;pre&gt;
Label:GetUserIput UserInputInvalid = GetUserInputDialog(....); 
if UserInputInvalid goto (GetUserIput);
&lt;/pre&gt;

Which could of course be shortened to the cryptic

&lt;pre&gt;
Label:GetUserIput if GetUserInputDialog(...) goto GetUserIput;
&lt;/pre&gt;

and doesn&#039;t allow for an escape unless the code is foolproof.</description>
		<content:encoded><![CDATA[<p>It&#8217;s 2010 and where is my beloved GOTO?</p>
<p>Using line numbers? If I insert a new line 1051&#8230; will my vector update automagically? If not, that&#8217;s a seriously bad implementation from the standpoint of maintiability. </p>
<p>Not a great idea from the standpoint of readability/maintainability&#8230; goto (line1051) may work but what does is mean? I have to goto line 1051 to figure that out.</p>
<p>What happened to the tried and true concept of using labels like </p>
<pre>
goto (GetUserInput)
</pre>
<p>I can construct workarounds the lack of a gotostatement , but why should I have to take the time and create structures that clutter my code to same something as simple and CLEAR as </p>
<pre>
Label:GetUserIput UserInputInvalid = GetUserInputDialog(....);
if UserInputInvalid goto (GetUserIput);
</pre>
<p>Which could of course be shortened to the cryptic</p>
<pre>
Label:GetUserIput if GetUserInputDialog(...) goto GetUserIput;
</pre>
<p>and doesn&#8217;t allow for an escape unless the code is foolproof.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-30146</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 26 Mar 2009 11:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-30146</guid>
		<description>Nick-

It really depends on your code.  You can rearrange code to use subfunctions or nested functions, and break and continue statements in loops.

--Loren</description>
		<content:encoded><![CDATA[<p>Nick-</p>
<p>It really depends on your code.  You can rearrange code to use subfunctions or nested functions, and break and continue statements in loops.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-30145</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Thu, 26 Mar 2009 09:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-30145</guid>
		<description>Hello  

I try to figure out what is going with &quot;go to&quot; statment in  MatLab but I am  afraid it&#039;s a big mess for me.My issue is the simplest one: Let&#039;s say I am  in line 32 and I want to go in line 87 how I do that? 
 What happens when I am in an IF statment and I need to say:  
if(bla bla bla) 
matlab code  
else  
&quot;go to&quot; line 51 
end  
Thanks in advance 
                               Nick</description>
		<content:encoded><![CDATA[<p>Hello  </p>
<p>I try to figure out what is going with &#8220;go to&#8221; statment in  MatLab but I am  afraid it&#8217;s a big mess for me.My issue is the simplest one: Let&#8217;s say I am  in line 32 and I want to go in line 87 how I do that?<br />
 What happens when I am in an IF statment and I need to say:<br />
if(bla bla bla)<br />
matlab code<br />
else<br />
&#8220;go to&#8221; line 51<br />
end<br />
Thanks in advance<br />
                               Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-26337</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Sun, 17 Feb 2008 18:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-26337</guid>
		<description>Dr. Phillip Feldman and Mray,

I have placed your request in the enhancement database.  Thank you for the feedback.

--Loren</description>
		<content:encoded><![CDATA[<p>Dr. Phillip Feldman and Mray,</p>
<p>I have placed your request in the enhancement database.  Thank you for the feedback.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mray</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-26306</link>
		<dc:creator>Mray</dc:creator>
		<pubDate>Sun, 17 Feb 2008 03:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-26306</guid>
		<description>Often, I like to &#039;break&#039; out of nested loops.
It would really help having a function that would allow that.</description>
		<content:encoded><![CDATA[<p>Often, I like to &#8216;break&#8217; out of nested loops.<br />
It would really help having a function that would allow that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. Phillip M. Feldman</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-23338</link>
		<dc:creator>Dr. Phillip M. Feldman</dc:creator>
		<pubDate>Sun, 16 Dec 2007 01:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-23338</guid>
		<description>Turning serious for just a moment: In nested loops, &quot;break&quot; exits only from the loop in which it occurs.  If Matlab had a goto statement, one legitimate application would be to break out of nested loops.  Currently, there is no good way of handling this situation in Matlab.</description>
		<content:encoded><![CDATA[<p>Turning serious for just a moment: In nested loops, &#8220;break&#8221; exits only from the loop in which it occurs.  If Matlab had a goto statement, one legitimate application would be to break out of nested loops.  Currently, there is no good way of handling this situation in Matlab.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/04/01/goto-coming-at-long-last-vectorized-no-less/#comment-16366</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 10 Aug 2007 00:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=29#comment-16366</guid>
		<description>Huda-

Look into try-catch, and writing functions that are reusable so you can call them from different sites in your code.

--Loren</description>
		<content:encoded><![CDATA[<p>Huda-</p>
<p>Look into try-catch, and writing functions that are reusable so you can call them from different sites in your code.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
</channel>
</rss>

