<?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 for Undocumented Matlab</title> <atom:link href="http://undocumentedmatlab.com/comments/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com</link> <description>Charting Matlab's unsupported hidden underbelly</description> <lastBuildDate>Mon, 21 May 2012 11:05:42 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.1</generator> <item><title>Comment on JMI wrapper &#8211; local MatlabControl part 1 by Vlad</title><link>http://undocumentedmatlab.com/blog/jmi-wrapper-local-matlabcontrol-part-1/#comment-86962</link> <dc:creator>Vlad</dc:creator> <pubDate>Mon, 21 May 2012 11:05:42 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=1354#comment-86962</guid> <description>Hi,could you post an example, how to get/set cell and struct arrays with matlabcontrol library form remote java code?
for example i have a 1x1 struct array variable S in workspace (marker: &#039;p&#039;, value: 80, factor: &#039;0.001&#039;, unit: &#039;mm&#039;) and want to get itthanks, Vlad</description> <content:encoded><![CDATA[<p>Hi,</p><p>could you post an example, how to get/set cell and struct arrays with matlabcontrol library form remote java code?<br
/> for example i have a 1&#215;1 struct array variable S in workspace (marker: &#8216;p&#8217;, value: 80, factor: &#8217;0.001&#8242;, unit: &#8216;mm&#8217;) and want to get it</p><p>thanks, Vlad</p> ]]></content:encoded> </item> <item><title>Comment on Preallocation performance by Alexander</title><link>http://undocumentedmatlab.com/blog/preallocation-performance/#comment-86954</link> <dc:creator>Alexander</dc:creator> <pubDate>Mon, 21 May 2012 09:59:09 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2940#comment-86954</guid> <description>Dear Yair,thanks for the link. Indeed I&#039;ve never seen this way of indexing befor and I&#039;m sure I&#039;ll use it in many places.The main step to understand seems to be to think of scalars being implemented as arrays with a singleton dimension. Then everything becomes clear. Thinks could be so easy ...Thanks</description> <content:encoded><![CDATA[<p>Dear Yair,</p><p>thanks for the link. Indeed I&#8217;ve never seen this way of indexing befor and I&#8217;m sure I&#8217;ll use it in many places.</p><p>The main step to understand seems to be to think of scalars being implemented as arrays with a singleton dimension. Then everything becomes clear. Thinks could be so easy &#8230;</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>Comment on Preallocation performance by Yair Altman</title><link>http://undocumentedmatlab.com/blog/preallocation-performance/#comment-86936</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Mon, 21 May 2012 07:20:23 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2940#comment-86936</guid> <description>@Alexander - using indexing to repeat array elements is such a standard technique for me that I didn&#039;t even think twice about the fact that it may not be well known... This technique is used numerous times in the Matlab code corpus, although now that you asked I couldn&#039;t find a direct doc reference for it (there probably is some reference, I just couldn&#039;t find it).Here is an unofficial &lt;a href=&quot;http://www.psi.toronto.edu/~vincent/matlabindexrepmat.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;article&lt;/a&gt; that explains the use.</description> <content:encoded><![CDATA[<p>@Alexander &#8211; using indexing to repeat array elements is such a standard technique for me that I didn&#8217;t even think twice about the fact that it may not be well known&#8230; This technique is used numerous times in the Matlab code corpus, although now that you asked I couldn&#8217;t find a direct doc reference for it (there probably is some reference, I just couldn&#8217;t find it).</p><p>Here is an unofficial <a
href="http://www.psi.toronto.edu/~vincent/matlabindexrepmat.html" target="_blank" rel="nofollow">article</a> that explains the use.</p> ]]></content:encoded> </item> <item><title>Comment on Preallocation performance by Alexander</title><link>http://undocumentedmatlab.com/blog/preallocation-performance/#comment-86932</link> <dc:creator>Alexander</dc:creator> <pubDate>Mon, 21 May 2012 06:44:57 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2940#comment-86932</guid> <description>Dear Yair,in your nice post you used the code&lt;pre lang=&quot;matlab&quot;&gt;
scalar = pi;  % for example...
data = scalar(ones(1000,3000));           % Variant A: 87.680 msecs
sum(a)
&lt;/pre&gt;I&#039;ve never seen this way of using a scalar, mapping it to an array. Is there any passage in the documentation you could cite or explanation why and how precisely this works?Alexander</description> <content:encoded><![CDATA[<p>Dear Yair,</p><p>in your nice post you used the code</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">scalar = <span style="color: #0000FF;">pi</span>;  <span style="color: #228B22;">% for example...</span>
&nbsp;
data = scalar<span style="color: #080;">&#40;</span><span style="color: #0000FF;">ones</span><span style="color: #080;">&#40;</span><span style="color: #33f;">1000</span>,<span style="color: #33f;">3000</span><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span>;           <span style="color: #228B22;">% Variant A: 87.680 msecs</span>
<span style="color: #0000FF;">sum</span><span style="color: #080;">&#40;</span>a<span style="color: #080;">&#41;</span></pre></div></div><p>I&#8217;ve never seen this way of using a scalar, mapping it to an array. Is there any passage in the documentation you could cite or explanation why and how precisely this works?</p><p>Alexander</p> ]]></content:encoded> </item> <item><title>Comment on Expanding urlread capabilities by Richard</title><link>http://undocumentedmatlab.com/blog/expanding-urlreads-capabilities/#comment-86894</link> <dc:creator>Richard</dc:creator> <pubDate>Mon, 21 May 2012 00:13:43 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2808#comment-86894</guid> <description>I found it much easier to create a &lt;i&gt;urlreadbin.m&lt;/i&gt; file based on &lt;i&gt;&lt;b&gt;urlread&lt;/b&gt;&lt;/i&gt; with a single line change.
Edit &lt;i&gt;urlread.m&lt;/i&gt; in the iofun directory using &quot;&lt;code&gt;open urlread.m&lt;/code&gt;&quot; and change the following:&lt;pre lang=&#039;matlab&#039;&gt;
%output = native2unicode(typecast(byteArrayOutputStream.toByteArray&#039;,&#039;uint8&#039;),&#039;UTF-8&#039;);
output = typecast(byteArrayOutputStream.toByteArray&#039;,&#039;uint8&#039;); %052012 oglraz
&lt;/pre&gt;Save as &lt;i&gt;urlreadbin.m&lt;/i&gt; in the iofun directory.This eliminates the bothersome unicode conversion.This is only for reads but grabs jpg files without an issue.</description> <content:encoded><![CDATA[<p>I found it much easier to create a <i>urlreadbin.m</i> file based on <i><b>urlread</b></i> with a single line change.<br
/> Edit <i>urlread.m</i> in the iofun directory using &#8220;<code>open urlread.m</code>&#8221; and change the following:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #228B22;">%output = native2unicode(typecast(byteArrayOutputStream.toByteArray','uint8'),'UTF-8');</span>
output = typecast<span style="color: #080;">&#40;</span>byteArrayOutputStream.<span style="">toByteArray</span>',<span style="color:#A020F0;">'uint8'</span><span style="color: #080;">&#41;</span>; <span style="color: #228B22;">%052012 oglraz</span></pre></div></div><p>Save as <i>urlreadbin.m</i> in the iofun directory.</p><p>This eliminates the bothersome unicode conversion.</p><p>This is only for reads but grabs jpg files without an issue.</p> ]]></content:encoded> </item> <item><title>Comment on Customizing menu items part 3 by John</title><link>http://undocumentedmatlab.com/blog/customizing-menu-items-part-3/#comment-86747</link> <dc:creator>John</dc:creator> <pubDate>Sat, 19 May 2012 21:39:16 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2909#comment-86747</guid> <description>Thanks Yair, I&#039;ll try that.</description> <content:encoded><![CDATA[<p>Thanks Yair, I&#8217;ll try that.</p> ]]></content:encoded> </item> <item><title>Comment on Customizing menu items part 3 by Yair Altman</title><link>http://undocumentedmatlab.com/blog/customizing-menu-items-part-3/#comment-86723</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Sat, 19 May 2012 19:44:21 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2909#comment-86723</guid> <description>@John - I don&#039;t believe that you can prevent the menu from closing. But if you trap the menu item&#039;s callback, you could possibly immediately reopen the menu programmatically, as explained in the &lt;a target=&quot;_blank&quot; href=&quot;http://undocumentedmatlab.com/blog/customizing-menu-items-part-2/#dynamic&quot; rel=&quot;nofollow&quot;&gt;previous article&lt;/a&gt; of this mini-series.</description> <content:encoded><![CDATA[<p>@John &#8211; I don&#8217;t believe that you can prevent the menu from closing. But if you trap the menu item&#8217;s callback, you could possibly immediately reopen the menu programmatically, as explained in the <a
target="_blank" href="http://undocumentedmatlab.com/blog/customizing-menu-items-part-2/#dynamic" rel="nofollow">previous article</a> of this mini-series.</p> ]]></content:encoded> </item> <item><title>Comment on Customizing menu items part 3 by John</title><link>http://undocumentedmatlab.com/blog/customizing-menu-items-part-3/#comment-86600</link> <dc:creator>John</dc:creator> <pubDate>Sat, 19 May 2012 01:49:27 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2909#comment-86600</guid> <description>Yair, is there any way to have the menu remain open after clicking it? Suppose you wanted to have a menu with a bunch of booleans, and you wanted to be able to quickly change the state of a bunch of them without doing click, reopen, click, reopen....Thanks,
John</description> <content:encoded><![CDATA[<p>Yair, is there any way to have the menu remain open after clicking it? Suppose you wanted to have a menu with a bunch of booleans, and you wanted to be able to quickly change the state of a bunch of them without doing click, reopen, click, reopen&#8230;.</p><p>Thanks,<br
/> John</p> ]]></content:encoded> </item> <item><title>Comment on Preallocation performance by Héctor</title><link>http://undocumentedmatlab.com/blog/preallocation-performance/#comment-86526</link> <dc:creator>Héctor</dc:creator> <pubDate>Fri, 18 May 2012 13:56:51 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=2940#comment-86526</guid> <description>I run on windows 7, Matlab R2010a. My Matlab has been doing things for 2 days and was release from heavy duty 5 minutes ago. This are my results:&lt;pre lang=&quot;matlab&quot;&gt;
&gt;&gt; clear data1, tic, data1 = zeros(1000,3000); toc
Elapsed time is 0.007353 seconds.
&gt;&gt; clear data1, tic, data1(1000,3000) = 0; toc
Elapsed time is 0.000027 seconds.
&gt;&gt; clear data1, tic, data1 = zeros(1000,3000); toc
Elapsed time is 0.007176 seconds.
&gt;&gt; clear data1, tic, data1(1000,3000) = 0; toc
Elapsed time is 0.000023 seconds.
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>I run on windows 7, Matlab R2010a. My Matlab has been doing things for 2 days and was release from heavy duty 5 minutes ago. This are my results:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">&gt;&gt; <span style="color: #0000FF;">clear</span> data1, <span style="color: #0000FF;">tic</span>, data1 = <span style="color: #0000FF;">zeros</span><span style="color: #080;">&#40;</span><span style="color: #33f;">1000</span>,<span style="color: #33f;">3000</span><span style="color: #080;">&#41;</span>; <span style="color: #0000FF;">toc</span>
Elapsed time <span style="color: #0000FF;">is</span> <span style="color: #33f;">0.007353</span> seconds.
&gt;&gt; <span style="color: #0000FF;">clear</span> data1, <span style="color: #0000FF;">tic</span>, data1<span style="color: #080;">&#40;</span><span style="color: #33f;">1000</span>,<span style="color: #33f;">3000</span><span style="color: #080;">&#41;</span> = <span style="color: #33f;">0</span>; <span style="color: #0000FF;">toc</span>
Elapsed time <span style="color: #0000FF;">is</span> <span style="color: #33f;">0.000027</span> seconds.
&gt;&gt; <span style="color: #0000FF;">clear</span> data1, <span style="color: #0000FF;">tic</span>, data1 = <span style="color: #0000FF;">zeros</span><span style="color: #080;">&#40;</span><span style="color: #33f;">1000</span>,<span style="color: #33f;">3000</span><span style="color: #080;">&#41;</span>; <span style="color: #0000FF;">toc</span>
Elapsed time <span style="color: #0000FF;">is</span> <span style="color: #33f;">0.007176</span> seconds.
&gt;&gt; <span style="color: #0000FF;">clear</span> data1, <span style="color: #0000FF;">tic</span>, data1<span style="color: #080;">&#40;</span><span style="color: #33f;">1000</span>,<span style="color: #33f;">3000</span><span style="color: #080;">&#41;</span> = <span style="color: #33f;">0</span>; <span style="color: #0000FF;">toc</span>
Elapsed time <span style="color: #0000FF;">is</span> <span style="color: #33f;">0.000023</span> seconds.</pre></div></div>]]></content:encoded> </item> <item><title>Comment on Accessing the Matlab Editor by Yair Altman</title><link>http://undocumentedmatlab.com/blog/accessing-the-matlab-editor/#comment-86481</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Fri, 18 May 2012 08:03:18 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=671#comment-86481</guid> <description>@Anubhav - try using Matlab&#039;s built-in &lt;i&gt;&lt;b&gt;opentoline&lt;/b&gt;&lt;/i&gt; function</description> <content:encoded><![CDATA[<p>@Anubhav &#8211; try using Matlab&#8217;s built-in <i><b>opentoline</b></i> function</p> ]]></content:encoded> </item> </channel> </rss>

<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              b7666
Template:           index
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: undocumentedmatlab.com @ 2012-05-21 20:58:07 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          comments/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.512s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1337659087; expires=Wed, 22-May-2013 03:58:07 GMT; path=/
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Tue, 22 May 2012 03:58:07 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Tue, 22 May 2012 04:58:07 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               5e74d34efe8e78c7c9834da719a83642
Content-Encoding:   gzip
-->
