<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085</link>
    <title>MATLAB Central Newsreader - How can you enlarge a matrix by adding zeroes</title>
    <description>Feed for thread: How can you enlarge a matrix by adding zeroes</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2013 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.fr/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 15 Jun 2012 21:43:06 +0000</pubDate>
      <title>How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880234</link>
      <author>Ellen </author>
      <description>Okay. Clearly that doesn't make sense worded like that. Let's say I have a matrix&lt;br&gt;
[1;2;3;4;5] &lt;br&gt;
But I want to to have dimensions 1x10. How could I fill the matrix up so that it is now&lt;br&gt;
[1;2;3;4;5;0;0;0;0;0] &lt;br&gt;
if I didn't know that the matrix originally had a dimension of 1x5. I only knew it had a dimension somewhere between 1x1 and 1x10.&lt;br&gt;
If that is even possible. Or if that even makes sense. Thanks!</description>
    </item>
    <item>
      <pubDate>Fri, 15 Jun 2012 21:48:10 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880236</link>
      <author>dpb</author>
      <description>On 6/15/2012 4:43 PM, Ellen wrote:&lt;br&gt;
&amp;gt; Okay. Clearly that doesn't make sense worded like that. Let's say I have&lt;br&gt;
&amp;gt; a matrix&lt;br&gt;
&amp;gt; [1;2;3;4;5] But I want to to have dimensions 1x10. How could I fill the&lt;br&gt;
&amp;gt; matrix up so that it is now&lt;br&gt;
&amp;gt; [1;2;3;4;5;0;0;0;0;0] if I didn't know that the matrix originally had a&lt;br&gt;
&amp;gt; dimension of 1x5. I only knew it had a dimension somewhere between 1x1&lt;br&gt;
&amp;gt; and 1x10.&lt;br&gt;
&amp;gt; If that is even possible. Or if that even makes sense. Thanks!&lt;br&gt;
&lt;br&gt;
If it exists in Matlab, it has a determinable dimension in each direction.&lt;br&gt;
&lt;br&gt;
Surprisingly enough, the function to determine this is size()  :)&lt;br&gt;
&lt;br&gt;
doc size&lt;br&gt;
&lt;br&gt;
To add from a given size to some other simply calculate what you need...&lt;br&gt;
&lt;br&gt;
x=[1:5]';&lt;br&gt;
x=[x; zeros(10-length(x),1)];  % another useful function here...&lt;br&gt;
size(x)&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 03:53:24 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880242</link>
      <author>Greg Heath</author>
      <description>On Jun 15, 5:43</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 05:25:12 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880247</link>
      <author>Nasser M. Abbasi</author>
      <description>On 6/15/2012 10:53 PM, Greg Heath wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Therefore the dimensions are 10x1 and 5x1. Use dpb's syntax: [1:5]',&lt;br&gt;
&amp;gt; etc&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
This syntax is not recommended. The better syntax is (1:5)'.&lt;br&gt;
&lt;br&gt;
The [] are not necessary. That is what Code analyzer would report.&lt;br&gt;
&lt;br&gt;
(edit-&amp;gt;tools-&amp;gt;Code analyze)&lt;br&gt;
&lt;br&gt;
--Nasser</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 06:31:13 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880248</link>
      <author>dpb</author>
      <description>On 6/16/2012 12:25 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt; On 6/15/2012 10:53 PM, Greg Heath wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Therefore the dimensions are 10x1 and 5x1. Use dpb's syntax: [1:5]',&lt;br&gt;
&amp;gt;&amp;gt; etc&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; This syntax is not recommended. The better syntax is (1:5)'.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The [] are not necessary. That is what Code analyzer would report.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; (edit-&amp;gt;tools-&amp;gt;Code analyze)&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
Well, if one starts following that advice, one will soon get more than a &lt;br&gt;
little confused as to when/why parens vis a vis brackets are even there...&lt;br&gt;
&lt;br&gt;
Extend it just a little and it breaks the other way...try writing&lt;br&gt;
&lt;br&gt;
(1:5 ; 3:7)'&lt;br&gt;
&lt;br&gt;
and see what it says about _that_.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 06:47:26 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880249</link>
      <author>Nasser M. Abbasi</author>
      <description>On 6/16/2012 1:31 AM, dpb wrote:&lt;br&gt;
&amp;gt; On 6/16/2012 12:25 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt;&amp;gt; On 6/15/2012 10:53 PM, Greg Heath wrote:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; Therefore the dimensions are 10x1 and 5x1. Use dpb's syntax: [1:5]',&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; etc&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; This syntax is not recommended. The better syntax is (1:5)'.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; The [] are not necessary. That is what Code analyzer would report.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; (edit-&amp;gt;tools-&amp;gt;Code analyze)&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Well, if one starts following that advice, one will soon get more than a&lt;br&gt;
&amp;gt; little confused as to when/why parens vis a vis brackets are even there...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Extend it just a little and it breaks the other way...try writing&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; (1:5 ; 3:7)'&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; and see what it says about _that_.&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
The above gives invalid syntax right in the editor. The editor shows&lt;br&gt;
little red markers where the syntax errors are. Hence I do not see&lt;br&gt;
how one can get confused by this vs. (1:5)' which does not give&lt;br&gt;
syntax error.&lt;br&gt;
&lt;br&gt;
I always run the code analyzer after I write something and&lt;br&gt;
follow its advice and make the changes it recommends. (exceptions&lt;br&gt;
is when I do not put ";" at end of a statement because I want to&lt;br&gt;
see the output, but code analyzer flags these out as well).&lt;br&gt;
&lt;br&gt;
But you are free not to follow its advice and write the code any&lt;br&gt;
way you want.&lt;br&gt;
&lt;br&gt;
--Nasser</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 12:17:14 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880259</link>
      <author>dpb</author>
      <description>On 6/16/2012 1:47 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt; On 6/16/2012 1:31 AM, dpb wrote:&lt;br&gt;
&amp;gt;&amp;gt; On 6/16/2012 12:25 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; On 6/15/2012 10:53 PM, Greg Heath wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; Therefore the dimensions are 10x1 and 5x1. Use dpb's syntax: [1:5]',&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt; etc&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; This syntax is not recommended. The better syntax is (1:5)'.&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; Well, if one starts following that advice, one will soon get more than a&lt;br&gt;
&amp;gt;&amp;gt; little confused as to when/why parens vis a vis brackets are even&lt;br&gt;
&amp;gt;&amp;gt; there...&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Extend it just a little and it breaks the other way...try writing&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; (1:5 ; 3:7)'&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; and see what it says about _that_.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The above gives invalid syntax right in the editor. The editor shows&lt;br&gt;
&amp;gt; little red markers where the syntax errors are. Hence I do not see&lt;br&gt;
&amp;gt; how one can get confused by this vs. (1:5)' which does not give&lt;br&gt;
&amp;gt; syntax error.&lt;br&gt;
&lt;br&gt;
Only if you have a release of Matlab that does that (which I don't and &lt;br&gt;
never will unless the big contract falls from the sky which isn't likely...)&lt;br&gt;
&lt;br&gt;
Meanwhile, if you try to train yourself to use () instead of [] in the &lt;br&gt;
restricted cases in which it makes sense while building a matrix you've &lt;br&gt;
then the pita of fixing all those red marks instead of making them int &lt;br&gt;
he first place.&lt;br&gt;
&lt;br&gt;
&amp;gt; I always run the code analyzer after I write something and&lt;br&gt;
&amp;gt; follow its advice and make the changes it recommends. (exceptions&lt;br&gt;
&amp;gt; is when I do not put ";" at end of a statement because I want to&lt;br&gt;
&amp;gt; see the output, but code analyzer flags these out as well).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; But you are free not to follow its advice and write the code any&lt;br&gt;
&amp;gt; way you want.&lt;br&gt;
&lt;br&gt;
Well, there's blind adherence and then there's reasonable use of the &lt;br&gt;
code analyzer's input.  I see absolutely no reason for the "suggestion" &lt;br&gt;
to not use [] when building a matrix whether 1D or not--it's consistency &lt;br&gt;
in syntax that leads to productivity not trying to do some special-rule &lt;br&gt;
thingie.  The specific usage was not as array subscript vector even in &lt;br&gt;
though in that case it works; it just makes no sense at all to switch &lt;br&gt;
just because it is possible.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 15:03:09 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880264</link>
      <author>Greg Heath</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrhtga$4ij$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
&amp;gt; On 6/16/2012 1:47 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt; &amp;gt; On 6/16/2012 1:31 AM, dpb wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; On 6/16/2012 12:25 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; On 6/15/2012 10:53 PM, Greg Heath wrote:&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Therefore the dimensions are 10x1 and 5x1. Use dpb's syntax: [1:5]',&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; etc&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt; This syntax is not recommended. The better syntax is (1:5)'.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Well, if one starts following that advice, one will soon get more than a&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; little confused as to when/why parens vis a vis brackets are even&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; there...&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Extend it just a little and it breaks the other way...try writing&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; (1:5 ; 3:7)'&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; and see what it says about _that_.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; The above gives invalid syntax right in the editor. The editor shows&lt;br&gt;
&amp;gt; &amp;gt; little red markers where the syntax errors are. Hence I do not see&lt;br&gt;
&amp;gt; &amp;gt; how one can get confused by this vs. (1:5)' which does not give&lt;br&gt;
&amp;gt; &amp;gt; syntax error.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Only if you have a release of Matlab that does that (which I don't and &lt;br&gt;
&amp;gt; never will unless the big contract falls from the sky which isn't likely...)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Meanwhile, if you try to train yourself to use () instead of [] in the &lt;br&gt;
&amp;gt; restricted cases in which it makes sense while building a matrix you've &lt;br&gt;
&amp;gt; then the pita of fixing all those red marks instead of making them int &lt;br&gt;
&amp;gt; he first place.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I always run the code analyzer after I write something and&lt;br&gt;
&amp;gt; &amp;gt; follow its advice and make the changes it recommends. (exceptions&lt;br&gt;
&amp;gt; &amp;gt; is when I do not put ";" at end of a statement because I want to&lt;br&gt;
&amp;gt; &amp;gt; see the output, but code analyzer flags these out as well).&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; But you are free not to follow its advice and write the code any&lt;br&gt;
&amp;gt; &amp;gt; way you want.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Well, there's blind adherence and then there's reasonable use of the &lt;br&gt;
&amp;gt; code analyzer's input.  I see absolutely no reason for the "suggestion" &lt;br&gt;
&amp;gt; to not use [] when building a matrix whether 1D or not--it's consistency &lt;br&gt;
&amp;gt; in syntax that leads to productivity not trying to do some special-rule &lt;br&gt;
&amp;gt; thingie.  The specific usage was not as array subscript vector even in &lt;br&gt;
&amp;gt; though in that case it works; it just makes no sense at all to switch &lt;br&gt;
&amp;gt; just because it is possible.&lt;br&gt;
&lt;br&gt;
I agree. &lt;br&gt;
&lt;br&gt;
However, the point I was trying to make was to use the " ' " instead of &lt;br&gt;
the plethora of internal " ; "s.&lt;br&gt;
&lt;br&gt;
Of course that has to change to " .' " with complex elements.&lt;br&gt;
&lt;br&gt;
Hope this helps.&lt;br&gt;
&lt;br&gt;
Greg</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 15:50:07 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880268</link>
      <author>Bruno Luong</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrhtga$4ij$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
&amp;gt; On 6/16/2012 1:47 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Well, there's blind adherence and then there's reasonable use of the &lt;br&gt;
&amp;gt; code analyzer's input.  I see absolutely no reason for the "suggestion" &lt;br&gt;
&amp;gt; to not use [] when building a matrix whether 1D or not--it's consistency &lt;br&gt;
&amp;gt; in syntax that leads to productivity not trying to do some special-rule &lt;br&gt;
&amp;gt; thingie.  The specific usage was not as array subscript vector even in &lt;br&gt;
&amp;gt; though in that case it works; it just makes no sense at all to switch &lt;br&gt;
&amp;gt; just because it is possible.&lt;br&gt;
&lt;br&gt;
Something about this warning that always bugs me.&lt;br&gt;
&lt;br&gt;
I believe warning tells something like [1:5] is less efficient than (1:5). But if it can detect what it can't correct it automatically when the code is parsed?&lt;br&gt;
&lt;br&gt;
May be it warns when the code would be run on older MATLAB version?&lt;br&gt;
&lt;br&gt;
At the time where I was aware about this warning, I prefer to use [] rather than () for clarity of coding, since parenthesis can be used for a lot of other circumstances (function, expression), whereas bracket is used exclusively for array.&lt;br&gt;
&lt;br&gt;
Just my $.02&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 16:16:54 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880270</link>
      <author>Nasser M. Abbasi</author>
      <description>On 6/16/2012 7:17 AM, dpb wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Well, there's blind adherence and then there's reasonable use of the&lt;br&gt;
&amp;gt; code analyzer's input.  I see absolutely no reason for the "suggestion"&lt;br&gt;
&amp;gt; to not use [] when building a matrix whether 1D or not&lt;br&gt;
&lt;br&gt;
Just because you see no reason really means nothing.&lt;br&gt;
&lt;br&gt;
Matlab is closed source. We do not know how Matlab handles () vs. []&lt;br&gt;
in this case. You have no access to the Matlab parser and the interpreter&lt;br&gt;
source code to see, and no one else has unless they work inside Mathworks.&lt;br&gt;
&lt;br&gt;
We as users, we have to assume the Matlab engineers who added this&lt;br&gt;
message to the code analyzer had a good reason to do it. They did&lt;br&gt;
not add it just for for the fun of it.&lt;br&gt;
&lt;br&gt;
You are free to second guess it and not follow the advice, but I&lt;br&gt;
prefer not to.&lt;br&gt;
&lt;br&gt;
--Nasser</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 17:02:21 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880273</link>
      <author>dpb</author>
      <description>On 6/16/2012 11:16 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt; On 6/16/2012 7:17 AM, dpb wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Well, there's blind adherence and then there's reasonable use of the&lt;br&gt;
&amp;gt;&amp;gt; code analyzer's input. I see absolutely no reason for the "suggestion"&lt;br&gt;
&amp;gt;&amp;gt; to not use [] when building a matrix whether 1D or not&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Just because you see no reason really means nothing.&lt;br&gt;
&lt;br&gt;
Just as your adherence... :)&lt;br&gt;
&lt;br&gt;
&amp;gt; Matlab is closed source. We do not know how Matlab handles () vs. []&lt;br&gt;
&amp;gt; in this case. You have no access to the Matlab parser and the interpreter&lt;br&gt;
&amp;gt; source code to see, and no one else has unless they work inside Mathworks.&lt;br&gt;
&lt;br&gt;
There's always the profiler.  Show it makes a difference in a real case &lt;br&gt;
and I'll change my opinion.&lt;br&gt;
&lt;br&gt;
&amp;gt; We as users, we have to assume the Matlab engineers who added this&lt;br&gt;
&amp;gt; message to the code analyzer had a good reason to do it. They did&lt;br&gt;
&amp;gt; not add it just for for the fun of it.&lt;br&gt;
&lt;br&gt;
Well, we can also assume that perhaps the code analyzer is just &lt;br&gt;
excessively over-zealous in its pursuit of code purity which in this &lt;br&gt;
case I'd expect has a pretty high chance of being the problem or that &lt;br&gt;
even if there is a theoretical difference that it would be rare it could &lt;br&gt;
be shown to actually make a measurable difference of significance.&lt;br&gt;
&lt;br&gt;
&amp;gt; You are free to second guess it and not follow the advice, but I&lt;br&gt;
&amp;gt; prefer not to.&lt;br&gt;
&lt;br&gt;
Indeed, you can spend your development time as you see fit in making &lt;br&gt;
inconsequential changes; I'll keep to the use of a symmetric syntax w/o &lt;br&gt;
special rules to remember as much as possible and thereby be done coding &lt;br&gt;
quicker and in the absolutely rare one in a billion or so case where it &lt;br&gt;
actually makes a difference worry about fixing it then.  :)&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 17:06:12 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880274</link>
      <author>dpb</author>
      <description>On 6/16/2012 10:03 AM, Greg Heath wrote:&lt;br&gt;
&amp;gt; dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrhtga$4ij$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
...&lt;br&gt;
&amp;gt;&amp;gt; Well, there's blind adherence and then there's reasonable use of the&lt;br&gt;
&amp;gt;&amp;gt; code analyzer's input. I see absolutely no reason for the "suggestion"&lt;br&gt;
&amp;gt;&amp;gt; to not use [] when building a matrix whether 1D or not--it's&lt;br&gt;
&amp;gt;&amp;gt; consistency in syntax that leads to productivity ...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I agree.&lt;br&gt;
&amp;gt; However, the point I was trying to make was to use the " ' " instead of&lt;br&gt;
&amp;gt; the plethora of internal " ; "s.&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
Indeed, that was also one of the points trying to make in my initial &lt;br&gt;
response; I was simply commenting above on Nasser's kneejerk reaction to &lt;br&gt;
an essentially meaningless warning/suggestion...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 18:02:23 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880277</link>
      <author>dpb</author>
      <description>On 6/16/2012 11:16 AM, Nasser M. Abbasi wrote:&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt; We as users, we have to assume the Matlab engineers who added this&lt;br&gt;
&amp;gt; message to the code analyzer had a good reason to do it. They did&lt;br&gt;
&amp;gt; not add it just for for the fun of it.&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
OK, I've done an extensive perusal of the online doc's for the last &lt;br&gt;
release and I can find no hints of TMW suggesting to write matrices w/o &lt;br&gt;
the brackets for performance in any situation.&lt;br&gt;
&lt;br&gt;
The links to parentheses and brackets have essentially identical &lt;br&gt;
documentation as I have here--it says 'help paren' has more info on &lt;br&gt;
parentheses but I can't do that except locally.&lt;br&gt;
&lt;br&gt;
I suppose it's possible that there's where the guidance is hidden but I &lt;br&gt;
seriously doubt it says anything of the sort there, either.&lt;br&gt;
&lt;br&gt;
So, I think the recommendation is simply an artifact of the code &lt;br&gt;
analyzer nobody has ever questioned seriously as to the validity/reason &lt;br&gt;
for it.  Otherwise one has to presume there's a real reason for &lt;br&gt;
special-casing the specific case and if so it's a significant oversight &lt;br&gt;
in the documentation that it isn't discussed.&lt;br&gt;
&lt;br&gt;
$0.025, imo, ymmv, etc., etc., etc., ...&lt;br&gt;
&lt;br&gt;
Maybe S Lord will stumble upon the argu^h^h^h^hdiscussion and can &lt;br&gt;
comment on the validity/significance of the analyzer and what &lt;br&gt;
applications it is intended to address.&lt;br&gt;
&lt;br&gt;
--&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 19:13:09 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880278</link>
      <author>Bruno Luong</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrihne$ncn$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
thing of the sort there, either.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So, I think the recommendation is simply an artifact of the code &lt;br&gt;
&amp;gt; analyzer nobody has ever questioned seriously as to the validity/reason &lt;br&gt;
&amp;gt; for it. &lt;br&gt;
&lt;br&gt;
Yes me. I did the test, and don't see any notable speed difference between [1:5] and (1:5). Win-64 2012A.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
tic&lt;br&gt;
for i=1:1000000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a = [1:5];&lt;br&gt;
end&lt;br&gt;
toc % Elapsed time is 0.127151 seconds.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
tic&lt;br&gt;
for i=1:1000000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a = (1:5);&lt;br&gt;
end&lt;br&gt;
toc % Elapsed time is 0.124224 seconds.&lt;br&gt;
&lt;br&gt;
Both are enclosed inside a function.&lt;br&gt;
&lt;br&gt;
What is the mlint message about???&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 19:32:02 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880279</link>
      <author>dpb</author>
      <description>On 6/16/2012 2:13 PM, Bruno Luong wrote:&lt;br&gt;
&amp;gt; dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrihne$ncn$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
&amp;gt; thing of the sort there, either.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; So, I think the recommendation is simply an artifact of the code&lt;br&gt;
&amp;gt;&amp;gt; analyzer nobody has ever questioned seriously as to the&lt;br&gt;
&amp;gt;&amp;gt; validity/reason for it.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Yes me. I did the test, and don't see any notable speed difference&lt;br&gt;
&amp;gt; between [1:5] and (1:5). Win-64 2012A.&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt; What is the mlint message about???&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
&lt;br&gt;
Bruno, I don't have a recent release...what does 'help paren' in you &lt;br&gt;
release say?  It doesn't have any such hint of any such usage does it?&lt;br&gt;
&lt;br&gt;
As noted, I looked thru the online doc's fairly thoroughly and find &lt;br&gt;
nothing; the one thing I can't do is the above for current/recent release.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 19:57:07 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880284</link>
      <author>Bruno Luong</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrimvi$4u1$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno, I don't have a recent release...what does 'help paren' in you &lt;br&gt;
&amp;gt; release say?  It doesn't have any such hint of any such usage does it?&lt;br&gt;
&lt;br&gt;
I did not see anything concerning the usage in the help.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Sat, 16 Jun 2012 20:16:48 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880285</link>
      <author>dpb</author>
      <description>On 6/16/2012 2:57 PM, Bruno Luong wrote:&lt;br&gt;
&amp;gt; dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;jrimvi$4u1$1@speranza.aioe.org&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Bruno, I don't have a recent release...what does 'help paren' in you&lt;br&gt;
&amp;gt;&amp;gt; release say? It doesn't have any such hint of any such usage does it?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I did not see anything concerning the usage in the help.&lt;br&gt;
&lt;br&gt;
What I expected... :)&lt;br&gt;
&lt;br&gt;
I think it's a fig-newton of a remnant consequence of an implementation &lt;br&gt;
algorithm w/ an unintended consequence, meself...iow, a bug. :)&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Mon, 18 Jun 2012 14:21:01 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880414</link>
      <author>Steven_Lord</author>
      <description>&lt;br&gt;
&lt;br&gt;
"dpb" &amp;lt;none@non.net&amp;gt; wrote in message news:jrihne$ncn$1@speranza.aioe.org...&lt;br&gt;
&amp;gt; On 6/16/2012 11:16 AM, Nasser M. Abbasi wrote:&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; We as users, we have to assume the Matlab engineers who added this&lt;br&gt;
&amp;gt;&amp;gt; message to the code analyzer had a good reason to do it. They did&lt;br&gt;
&amp;gt;&amp;gt; not add it just for for the fun of it.&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; OK, I've done an extensive perusal of the online doc's for the last &lt;br&gt;
&amp;gt; release and I can find no hints of TMW suggesting to write matrices w/o &lt;br&gt;
&amp;gt; the brackets for performance in any situation.&lt;br&gt;
&lt;br&gt;
Try this little experiment in the Command Window. You will receive warnings &lt;br&gt;
from the DBSTOP calls, but that's to be expected.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/help/techdoc/ref/dbstop.html"&gt;http://www.mathworks.com/help/techdoc/ref/dbstop.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
"If file is not a MATLAB code file (for instance, it is a built-in or &lt;br&gt;
MDL-file), then MATLAB issues a warning. MATLAB cannot stop in the file, so &lt;br&gt;
it pauses before executing the file."&lt;br&gt;
&lt;br&gt;
dbstop in horzcat&lt;br&gt;
dbstop in vertcat&lt;br&gt;
a = [5]&lt;br&gt;
&lt;br&gt;
Note that MATLAB DOES call the built-in concatenation routine here, since &lt;br&gt;
you're using []. Whether or not it calls the built-in concatenation routines &lt;br&gt;
in a function file depends on how old a version of MATLAB you're using, I &lt;br&gt;
think. The parser may be smart enough in later releases to avoid the &lt;br&gt;
unnecessary call to the built-in concatenation routine since it can tell &lt;br&gt;
that the built-in routine will be called. Code Analyzer does _static_ &lt;br&gt;
analysis of the code; the parser is not limited to static analysis when &lt;br&gt;
running the code.&lt;br&gt;
&lt;br&gt;
Granted, the concatenation routine doesn't have to DO much or anything in &lt;br&gt;
this case, so it may not seem like a big deal. But consider doing this &lt;br&gt;
inside a loop that iterates millions of times; the tiny overhead of calling &lt;br&gt;
the built-in function may add up.&lt;br&gt;
&lt;br&gt;
&amp;gt; The links to parentheses and brackets have essentially identical &lt;br&gt;
&amp;gt; documentation as I have here--it says 'help paren' has more info on &lt;br&gt;
&amp;gt; parentheses but I can't do that except locally.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I suppose it's possible that there's where the guidance is hidden but I &lt;br&gt;
&amp;gt; seriously doubt it says anything of the sort there, either.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; So, I think the recommendation is simply an artifact of the code analyzer &lt;br&gt;
&amp;gt; nobody has ever questioned seriously as to the validity/reason for it. &lt;br&gt;
&amp;gt; Otherwise one has to presume there's a real reason for special-casing the &lt;br&gt;
&amp;gt; specific case and if so it's a significant oversight in the documentation &lt;br&gt;
&amp;gt; that it isn't discussed.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; $0.025, imo, ymmv, etc., etc., etc., ...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Maybe S Lord will stumble upon the argu^h^h^h^hdiscussion and can comment &lt;br&gt;
&amp;gt; on the validity/significance of the analyzer and what applications it is &lt;br&gt;
&amp;gt; intended to address.&lt;br&gt;
&lt;br&gt;
If the parser has gotten smart enough, perhaps the particular message that &lt;br&gt;
you and Bruno have been "discussing" is no longer necessary for functions or &lt;br&gt;
classdef files. I'll ask the Code Analyzer developers to investigate and &lt;br&gt;
determine if that message can be removed.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
To contact Technical Support use the Contact Us link on &lt;br&gt;
&lt;a href="http://www.mathworks.com"&gt;http://www.mathworks.com&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Mon, 18 Jun 2012 14:59:15 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880424</link>
      <author>dpb</author>
      <description>On 6/18/2012 9:21 AM, Steven_Lord wrote:&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt; Try this little experiment in the Command Window. You will receive&lt;br&gt;
&amp;gt; warnings from the DBSTOP calls, but that's to be expected.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &lt;a href="http://www.mathworks.com/help/techdoc/ref/dbstop.html"&gt;http://www.mathworks.com/help/techdoc/ref/dbstop.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; "If file is not a MATLAB code file (for instance, it is a built-in or&lt;br&gt;
&amp;gt; MDL-file), then MATLAB issues a warning. MATLAB cannot stop in the file,&lt;br&gt;
&amp;gt; so it pauses before executing the file."&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; dbstop in horzcat&lt;br&gt;
&amp;gt; dbstop in vertcat&lt;br&gt;
&amp;gt; a = [5]&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Note that MATLAB DOES call the built-in concatenation routine here,&lt;br&gt;
&amp;gt; since you're using [].&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
What am I supposed to see, Steve?&lt;br&gt;
&lt;br&gt;
I see no difference between [] or ()...&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt; dbstop in horzcat;dbstop in vertcat;a=[5]&lt;br&gt;
??? Error using ==&amp;gt; dbstop&lt;br&gt;
DBSTOP or DBCLEAR in a built-in function is not possible.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt; dbstop in horzcat;dbstop in vertcat;a=(5)&lt;br&gt;
??? Error using ==&amp;gt; dbstop&lt;br&gt;
DBSTOP or DBCLEAR in a built-in function is not possible.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;gt;&lt;br&gt;
&lt;br&gt;
It appears it stops either way...&lt;br&gt;
&lt;br&gt;
&amp;gt; ... Whether or not it calls the built-in&lt;br&gt;
&amp;gt; concatenation routines in a function file depends on how old a version&lt;br&gt;
&amp;gt; of MATLAB you're using, I think. The parser may be smart enough in later&lt;br&gt;
&amp;gt; releases to avoid the unnecessary call to the built-in concatenation&lt;br&gt;
&amp;gt; routine since it can tell that the built-in routine will be called. Code&lt;br&gt;
&amp;gt; Analyzer does _static_ analysis of the code; the parser is not limited&lt;br&gt;
&amp;gt; to static analysis when running the code.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Granted, the concatenation routine doesn't have to DO much or anything&lt;br&gt;
&amp;gt; in this case, so it may not seem like a big deal. But consider doing&lt;br&gt;
&amp;gt; this inside a loop that iterates millions of times; the tiny overhead of&lt;br&gt;
&amp;gt; calling the built-in function may add up.&lt;br&gt;
&lt;br&gt;
I can't see how the actual code executed by either path can be &lt;br&gt;
significantly different for the limited cases in which the [] can be &lt;br&gt;
replaced by () is where I was coming from, though, Steve.  Bruno's test &lt;br&gt;
was the type of test you outline above.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; The links to parentheses and brackets have essentially identical&lt;br&gt;
&amp;gt;&amp;gt; documentation as I have here--it says 'help paren' has more info on&lt;br&gt;
&amp;gt;&amp;gt; parentheses but I can't do that except locally.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; I suppose it's possible that there's where the guidance is hidden but&lt;br&gt;
&amp;gt;&amp;gt; I seriously doubt it says anything of the sort there, either.&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; Maybe S Lord will stumble upon the argu^h^h^h^hdiscussion and can&lt;br&gt;
&amp;gt;&amp;gt; comment on the validity/significance of the analyzer and what&lt;br&gt;
&amp;gt;&amp;gt; applications it is intended to address.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If the parser has gotten smart enough, perhaps the particular message&lt;br&gt;
&amp;gt; that you and Bruno have been "discussing" is no longer necessary for&lt;br&gt;
&amp;gt; functions or classdef files. I'll ask the Code Analyzer developers to&lt;br&gt;
&amp;gt; investigate and determine if that message can be removed.&lt;br&gt;
&lt;br&gt;
If this is really a real issue and TMW can demonstrate to themselves &lt;br&gt;
there's a realistic chance that anybody could ever tell the difference, &lt;br&gt;
then I repeat that it definitely needs to go into the documentation &lt;br&gt;
somewhere visible as a coding practice.&lt;br&gt;
&lt;br&gt;
Until then, I still think the user will have more productive time in &lt;br&gt;
maintaining a consistent coding style rather than trying to remember to &lt;br&gt;
special case it or spending time fixing up warnings over it--I just &lt;br&gt;
doubt he'll ever recoup that effort (at least until the profiler shows a &lt;br&gt;
bottleneck and I'm thinking the chances of that are somewhere between &lt;br&gt;
slim and none and Slim left town... :) )&lt;br&gt;
&lt;br&gt;
It seems to me the kind of micro-optimizing that folks try to do to &lt;br&gt;
smooge code into supposedly faster code by doing things like manual loop &lt;br&gt;
unrolling, etc., on the assumption the compiler isn't as smart.  These &lt;br&gt;
days, most of the time the compiler optimizer is probably more capable &lt;br&gt;
than the programmer who just writes clear, straightforward code (and &lt;br&gt;
even Matlab keeps going farther that way w/ JIT and as you point out, &lt;br&gt;
pretty smart parsing).&lt;br&gt;
&lt;br&gt;
It's a nit, granted, but...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Tue, 19 Jun 2012 14:26:36 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880511</link>
      <author>Steven_Lord</author>
      <description>&lt;br&gt;
&lt;br&gt;
"dpb" &amp;lt;none@non.net&amp;gt; wrote in message news:jrnfo5$ujj$1@speranza.aioe.org...&lt;br&gt;
&amp;gt; On 6/18/2012 9:21 AM, Steven_Lord wrote:&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Try this little experiment in the Command Window. You will receive&lt;br&gt;
&amp;gt;&amp;gt; warnings from the DBSTOP calls, but that's to be expected.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; &lt;a href="http://www.mathworks.com/help/techdoc/ref/dbstop.html"&gt;http://www.mathworks.com/help/techdoc/ref/dbstop.html&lt;/a&gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; "If file is not a MATLAB code file (for instance, it is a built-in or&lt;br&gt;
&amp;gt;&amp;gt; MDL-file), then MATLAB issues a warning. MATLAB cannot stop in the file,&lt;br&gt;
&amp;gt;&amp;gt; so it pauses before executing the file."&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; dbstop in horzcat&lt;br&gt;
&amp;gt;&amp;gt; dbstop in vertcat&lt;br&gt;
&amp;gt;&amp;gt; a = [5]&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Note that MATLAB DOES call the built-in concatenation routine here,&lt;br&gt;
&amp;gt;&amp;gt; since you're using [].&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; What am I supposed to see, Steve?&lt;br&gt;
&lt;br&gt;
A behavior that it appears was introduced in a later version than the one &lt;br&gt;
you're using, sorry. :(&lt;br&gt;
&lt;br&gt;
&amp;gt; I see no difference between [] or ()...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; dbstop in horzcat;dbstop in vertcat;a=[5]&lt;br&gt;
&amp;gt; ??? Error using ==&amp;gt; dbstop&lt;br&gt;
&amp;gt; DBSTOP or DBCLEAR in a built-in function is not possible.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; dbstop in horzcat;dbstop in vertcat;a=(5)&lt;br&gt;
&amp;gt; ??? Error using ==&amp;gt; dbstop&lt;br&gt;
&amp;gt; DBSTOP or DBCLEAR in a built-in function is not possible.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; It appears it stops either way...&lt;br&gt;
&lt;br&gt;
In release R2012a, the first of those codes enters debug mode when the "a = &lt;br&gt;
[5]" line was executed. The second does not.&lt;br&gt;
&lt;br&gt;
*snip*&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; If the parser has gotten smart enough, perhaps the particular message&lt;br&gt;
&amp;gt;&amp;gt; that you and Bruno have been "discussing" is no longer necessary for&lt;br&gt;
&amp;gt;&amp;gt; functions or classdef files. I'll ask the Code Analyzer developers to&lt;br&gt;
&amp;gt;&amp;gt; investigate and determine if that message can be removed.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If this is really a real issue and TMW can demonstrate to themselves &lt;br&gt;
&amp;gt; there's a realistic chance that anybody could ever tell the difference, &lt;br&gt;
&amp;gt; then I repeat that it definitely needs to go into the documentation &lt;br&gt;
&amp;gt; somewhere visible as a coding practice.&lt;br&gt;
&lt;br&gt;
This particular Code Analyzer message may be warning about something that's &lt;br&gt;
no longer be an issue (even if it may have been in the past) and that's why &lt;br&gt;
I asked the Code Analyzer developers to investigate and consider removing &lt;br&gt;
the message if appropriate. If there is a reason for this message to stick &lt;br&gt;
around and it's not something extremely esoteric I'll ask that it be &lt;br&gt;
included in the documentation.&lt;br&gt;
&lt;br&gt;
&amp;gt; Until then, I still think the user will have more productive time in &lt;br&gt;
&amp;gt; maintaining a consistent coding style rather than trying to remember to &lt;br&gt;
&amp;gt; special case it or spending time fixing up warnings over it--I just doubt &lt;br&gt;
&amp;gt; he'll ever recoup that effort (at least until the profiler shows a &lt;br&gt;
&amp;gt; bottleneck and I'm thinking the chances of that are somewhere between slim &lt;br&gt;
&amp;gt; and none and Slim left town... :) )&lt;br&gt;
&lt;br&gt;
It's a fair point. As we've seen in CSSM, people will sometimes go to &lt;br&gt;
extreme lengths to get what they believe to be a 1% increase in performance &lt;br&gt;
... even before their code is fully finished.&lt;br&gt;
&lt;br&gt;
&amp;gt; It seems to me the kind of micro-optimizing that folks try to do to smooge &lt;br&gt;
&amp;gt; code into supposedly faster code by doing things like manual loop &lt;br&gt;
&amp;gt; unrolling, etc., on the assumption the compiler isn't as smart.  These &lt;br&gt;
&amp;gt; days, most of the time the compiler optimizer is probably more capable &lt;br&gt;
&amp;gt; than the programmer who just writes clear, straightforward code (and even &lt;br&gt;
&amp;gt; Matlab keeps going farther that way w/ JIT and as you point out, pretty &lt;br&gt;
&amp;gt; smart parsing).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; It's a nit, granted, but...&lt;br&gt;
&lt;br&gt;
Agreed. That's one reason why we removed the column in the Profiler that &lt;br&gt;
talked about whether a line was processed by the JIT -- ideally we want you &lt;br&gt;
to write clear, clean code and let us (MathWorks) worry about making it &lt;br&gt;
fast.&lt;br&gt;
If some clear, clean code is not running fast enough THEN post to CSSM, ask &lt;br&gt;
on MATLAB Answers, or ask Technical Support for how to modify the code to &lt;br&gt;
improve the speed (or request of Technical Support that we investigate if &lt;br&gt;
there's a way to make that clean code faster.)&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com&lt;br&gt;
To contact Technical Support use the Contact Us link on &lt;br&gt;
&lt;a href="http://www.mathworks.com"&gt;http://www.mathworks.com&lt;/a&gt; </description>
    </item>
    <item>
      <pubDate>Tue, 19 Jun 2012 16:22:00 +0000</pubDate>
      <title>Re: How can you enlarge a matrix by adding zeroes</title>
      <link>http://www.mathworks.fr/matlabcentral/newsreader/view_thread/321085#880523</link>
      <author>dpb</author>
      <description>On 6/19/2012 9:26 AM, Steven_Lord wrote:&lt;br&gt;
&amp;gt; "dpb" &amp;lt;none@non.net&amp;gt; wrote in message&lt;br&gt;
&amp;gt; news:jrnfo5$ujj$1@speranza.aioe.org...&lt;br&gt;
&lt;br&gt;
...[big snip]...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; ...I still think the user will have more productive time in&lt;br&gt;
&amp;gt;&amp;gt; maintaining a consistent coding style rather than trying to remember&lt;br&gt;
&amp;gt;&amp;gt; to special case it or spending time fixing up warnings over it--I just&lt;br&gt;
&amp;gt;&amp;gt; doubt he'll ever recoup that effort (at least until the profiler shows&lt;br&gt;
&amp;gt;&amp;gt; a bottleneck and I'm thinking the chances of that are somewhere&lt;br&gt;
&amp;gt;&amp;gt; between slim and none and Slim left town... :) )&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; It's a fair point. As we've seen in CSSM, people will sometimes go to&lt;br&gt;
&amp;gt; extreme lengths to get what they believe to be a 1% increase in&lt;br&gt;
&amp;gt; performance .... even before their code is fully finished.&lt;br&gt;
...&lt;br&gt;
&amp;gt; If some clear, clean code is not running fast enough THEN post to CSSM,&lt;br&gt;
&amp;gt; ask on MATLAB Answers, or ask Technical Support for how to modify the&lt;br&gt;
&amp;gt; code to improve the speed (or request of Technical Support that we&lt;br&gt;
&amp;gt; investigate if there's a way to make that clean code faster.)&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
OK, thanks, Steven...I think/agree the review is worthy way to proceed.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
  </channel>
</rss>
