<?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>Mathworks.com &#8211; Undocumented Matlab</title>
	<atom:link href="https://undocumentedmatlab.com/articles/tag/mathworks-com/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 05 Oct 2017 18:25:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>Tips for accelerating Matlab performance</title>
		<link>https://undocumentedmatlab.com/articles/tips-for-accelerating-matlab-performance?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tips-for-accelerating-matlab-performance</link>
					<comments>https://undocumentedmatlab.com/articles/tips-for-accelerating-matlab-performance#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 05 Oct 2017 18:25:06 +0000</pubDate>
				<category><![CDATA[Handle graphics]]></category>
		<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Mathworks.com]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Pure Matlab]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=7099</guid>

					<description><![CDATA[<p>My article on "Tips for Accelerating MATLAB Performance" was recently featured in the September 2017 Matlab newsletter digest. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/tips-for-accelerating-matlab-performance">Tips for accelerating Matlab performance</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/some-performance-tuning-tips" rel="bookmark" title="Some Matlab performance-tuning tips">Some Matlab performance-tuning tips </a> <small>Matlab can be made to run much faster using some simple optimization techniques. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/new-book-accelerating-matlab-performance" rel="bookmark" title="New book: Accelerating MATLAB Performance">New book: Accelerating MATLAB Performance </a> <small>Accelerating MATLAB Performance (ISBN 9781482211290) is a book dedicated to improving Matlab performance (speed). ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/a-few-parfor-tips" rel="bookmark" title="A few parfor tips">A few parfor tips </a> <small>The parfor (parallel for) loops can be made faster using a few simple tips. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-java-memory-leaks-performance" rel="bookmark" title="Matlab-Java memory leaks, performance">Matlab-Java memory leaks, performance </a> <small>Internal fields of Java objects may leak memory - this article explains how to avoid this without sacrificing performance. ...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m proud to report that MathWorks has recently posted my article &#8220;<a href="https://www.mathworks.com/company/newsletters/articles/tips-for-accelerating-matlab-performance.html" rel="nofollow" target="_blank"><i>Tips for Accelerating MATLAB Performance</i></a>&#8221; in their latest newsletter digest (September 2017). This article is an updated and expanded version of <a href="/articles/some-performance-tuning-tips" target="_blank">my post</a> about consulting work that I did for the <a href="http://summit.fas.harvard.edu" rel="nofollow" target="_blank">Crustal Dynamics Research Group</a> at Harvard University, where I helped speed-up a complex Matlab-based GUI by a factor of 50-500 (depending on the specific feature). You can read the full <a href="/articles/some-performance-tuning-tips" target="_blank">detailed technical article</a> here.<br />
<center><figure style="width: 600px" class="wp-caption aligncenter"><a target="_blank" href="/images/ResultManagerGUI.gif"><img fetchpriority="high" decoding="async" alt="Crustal dynamics visualization GUI" src="https://undocumentedmatlab.com/images/ResultManagerGUI_600x401.gif" title="Crustal dynamics visualization GUI" width="600" height="401" /></a><figcaption class="wp-caption-text">Crustal dynamics visualization GUI</figcaption></figure></center><span id="more-7099"></span><br />
Featuring an article on the official newsletter by a non-MathWorker is rare. Doing this with someone like myself who has a reputation for undocumented aspects, and a consultancy business that potentially competes with theirs, is certainly not obvious. I take this to be a sign that despite the possible drawbacks of publishing my article, MathWorks felt that it provided enough value to the Matlab user community to merit the risk. I applaud MathWorks for this, and thank them for the opportunity of being featured in their official newsletter and conferences. I do not take it for granted in the least.<br />
The newsletter article provides multiple ideas of improving the run-time performance for file I/O and graphics. Many additional techniques for improving Matlab&#8217;s performance can be found under the <a href="/articles/tag/performance" target="_blank">Performance tag</a> in this blog, as well as in my book &#8220;<a href="/books/matlab-performance" target="_blank"><b>Accelerating MATLAB Performance</b></a>&#8221; (CRC Press, 2014, ISBN 978-1482211290).<br />
<!--
Next week I will present live online webinars about various ways to improve Matlab's run-time performance:


<ul>
	

<li>Oct 9, 2017 (Mon) - <a target="_blank" href="/courses/Matlab_Performance_Tuning_1_Webinar.pdf">Matlab performance tuning part 1</a> - $295 (<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&currency_code=USD&business=octahedron.ltd@gmail.com&quantity=1&amount=295&item_name=Matlab+performance+1+webinar" rel="nofollow" target="_blank">buy</a>)</li>


	

<li>Oct 10, 2017 (Tue) - <a target="_blank" href="/courses/Matlab_Performance_Tuning_2_Webinar.pdf">Matlab performance tuning part 2</a> - $295 (<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&currency_code=USD&business=octahedron.ltd@gmail.com&quantity=1&amount=295&item_name=Matlab+performance+2+webinar" rel="nofollow" target="_blank">buy</a>)
 &nbsp;&nbsp;&nbsp; ==> or buy both Matlab performance tuning webinars for only $495 (<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&currency_code=USD&business=octahedron.ltd@gmail.com&quantity=1&amount=495&item_name=Matlab+performance+webinars" rel="nofollow" target="_blank">buy</a>)</li>


</ul>


These live webinars will be 3.5 hours long, starting at 10am EDT (7am PDT, 3pm UK, 4pm CET, 7:30pm IST, <a href="https://www.google.com/search?q=9am+edt+to+my+time" rel="nofollow" target="_blank">time in your local timezone</a>), with a short break in the middle. The presentations content will be based on onsite training courses that I presented at multiple client locations (<a href="/training#onsite" target="_blank">details</a>). A recording of the webinars will be available for anyone who cannot join the live events.
--><br />
I am offering a couple of webinars about various ways to improve Matlab&#8217;s run-time performance:</p>
<ul>
<li><a target="_blank" href="/courses/Matlab_Performance_Tuning_1_Webinar.pdf">Matlab performance tuning part 1</a> (3:39 hours, <a target="_blank" href="/courses/Matlab_Performance_Tuning_1_Webinar.pdf">syllabus</a>) &#8211; $195 (<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&#038;currency_code=USD&#038;business=octahedron.ltd@gmail.com&#038;quantity=1&#038;amount=195&#038;item_name=Matlab+performance+1+webinar" rel="nofollow" target="_blank">buy</a>)</li>
<li><a target="_blank" href="/courses/Matlab_Performance_Tuning_2_Webinar.pdf">Matlab performance tuning part 2</a> (3:43 hours, <a target="_blank" href="/courses/Matlab_Performance_Tuning_2_Webinar.pdf">syllabus</a>) &#8211; $195 (<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&#038;currency_code=USD&#038;business=octahedron.ltd@gmail.com&#038;quantity=1&#038;amount=195&#038;item_name=Matlab+performance+2+webinar" rel="nofollow" target="_blank">buy</a>)<br />
 &nbsp;&nbsp;&nbsp; ==> or buy both Matlab performance tuning webinars for only $345 (<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&#038;currency_code=USD&#038;business=octahedron.ltd@gmail.com&#038;quantity=1&#038;amount=345&#038;item_name=Matlab+performance+webinars" rel="nofollow" target="_blank">buy</a>)</li>
</ul>
<p>Both the webinar videos and their corresponding slide-decks are available for download. The webinars content is based on onsite training courses that I presented at multiple client locations (<a href="/training#onsite" target="_blank">details</a>).<br />
<a href="mailto: altmany @gmail.com?subject=Matlab webinars&#038;body=Hi Yair, &#038;cc=;&#038;bcc=" rel="nofollow" target="_blank" onclick="var n='altmany'; var d='gmail.com'; window.open('mailto:'+n+'@'+d+'?subject=Matlab webinars&#038;body=Hi Yair, '); return false;"><img decoding="async" src="https://undocumentedmatlab.com/images/email-icon.png" width="32" height="22" alt="" style="vertical-align:middle;border:0"/>&nbsp;Email me</a> if you would like additional information on the webinars or my consulting, or to inquire regarding an onsite training course.</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/tips-for-accelerating-matlab-performance">Tips for accelerating Matlab performance</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/some-performance-tuning-tips" rel="bookmark" title="Some Matlab performance-tuning tips">Some Matlab performance-tuning tips </a> <small>Matlab can be made to run much faster using some simple optimization techniques. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/new-book-accelerating-matlab-performance" rel="bookmark" title="New book: Accelerating MATLAB Performance">New book: Accelerating MATLAB Performance </a> <small>Accelerating MATLAB Performance (ISBN 9781482211290) is a book dedicated to improving Matlab performance (speed). ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/a-few-parfor-tips" rel="bookmark" title="A few parfor tips">A few parfor tips </a> <small>The parfor (parallel for) loops can be made faster using a few simple tips. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-java-memory-leaks-performance" rel="bookmark" title="Matlab-Java memory leaks, performance">Matlab-Java memory leaks, performance </a> <small>Internal fields of Java objects may leak memory - this article explains how to avoid this without sacrificing performance. ...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/tips-for-accelerating-matlab-performance/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>MathWorks blogs facelift</title>
		<link>https://undocumentedmatlab.com/articles/mathworks-blogs-facelift?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mathworks-blogs-facelift</link>
					<comments>https://undocumentedmatlab.com/articles/mathworks-blogs-facelift#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 12 Jan 2014 21:01:11 +0000</pubDate>
				<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Mathworks.com]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4573</guid>

					<description><![CDATA[<p>MathWorks has just released a new look-&#038;-feel for their blogs section. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/mathworks-blogs-facelift">MathWorks blogs facelift</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/mathworks-solicited-java-survey" rel="bookmark" title="MathWorks-solicited Java survey">MathWorks-solicited Java survey </a> <small>MathWorks is soliciting user feedbacks about the use of Java components in Matlab programs. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/docs-of-old-matlab-releases" rel="bookmark" title="Docs of old Matlab releases">Docs of old Matlab releases </a> <small>MathWorks recently posted archived documentation for many previous Matlab releases...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/accessing-plot-brushed-data" rel="bookmark" title="Accessing plot brushed data">Accessing plot brushed data </a> <small>Plot data brushing can be accessed programmatically using very simple pure-Matlab code...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/specialized-matlab-plots" rel="bookmark" title="Specialized Matlab plots">Specialized Matlab plots </a> <small>The new MathWorks Plot Gallery provides access to some plotting examples on the File Exchange. Numerous others are available, extending the customizability of Matlab graphics. ...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>For those of you who have not noticed, MathWorks has made a very nice facelift to its <a target="_blank" rel="nofollow" href="http://blogs.mathworks.com/">official blogs</a> section on Matlab Central (there are also some unofficial internal blogs, but they are unfortunately <a target="_blank" href="/articles/docs-of-old-matlab-releases/#comment-17044">not publicly accessible</a>).<br />
If you have not done so already, I encourage you to browse the available blogs and subscribe &#8211; some very interesting content has accumulated there, and continues to be added a few times each month. I follow these blogs closely, and have learned quite a bit from them over the years.<br />
No official announcement has been released yet AFAIK. However, I expect (at the very least) a post about this in the next few days in the &#8220;<a target="_blank" rel="nofollow" href="http://blogs.mathworks.com/community/">Matlab Spoken Here</a>&#8221; blog (formerly the Desktop or Community blog). If and when it is posted, I encourage you to post a comment there, letting MathWorks know what you think of the new look-&#038;-feel. Until then, this remains an undocumented feature [ he he 🙂 ] and you can leave your comments below&#8230;<br />
Don&#8217;t let this stop you from subscribing to this blog &#8211; simply click the RSS button or subscription link at the top of this webpage to get the latest undocumented article delivered to you via email or reader, once a week. And guess what? it&#8217;s completely free&#8230; In the meantime, enjoy the following earth-shattering archaeological find that I found in some online archive:<br />
<center><figure style="width: 450px" class="wp-caption aligncenter"><img decoding="async" alt="Prehistorical Matlab blog from Draa River" src="https://undocumentedmatlab.com/images/Prehistory.jpg" title="Prehistorical Matlab blog from Draa River" width="450" height="331" /><figcaption class="wp-caption-text">Prehistorical Matlab blog from <a target='_blank' rel='nofollow' href='http://en.wikipedia.org/wiki/Draa_River'>Draa River</a><br />note the incomplete formula (left) and the simplistic plot figure (right)</figcaption></figure></center><br />
<u><b>Addendum April 4, 2014</b></u>: It took some time but the anticipated official MathWorks blog post about this <a target="_blank" rel="nofollow" href="http://blogs.mathworks.com/community/2014/04/04/matlab-central-blog-improvements">has finally arrived today</a>!</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/mathworks-blogs-facelift">MathWorks blogs facelift</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/mathworks-solicited-java-survey" rel="bookmark" title="MathWorks-solicited Java survey">MathWorks-solicited Java survey </a> <small>MathWorks is soliciting user feedbacks about the use of Java components in Matlab programs. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/docs-of-old-matlab-releases" rel="bookmark" title="Docs of old Matlab releases">Docs of old Matlab releases </a> <small>MathWorks recently posted archived documentation for many previous Matlab releases...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/accessing-plot-brushed-data" rel="bookmark" title="Accessing plot brushed data">Accessing plot brushed data </a> <small>Plot data brushing can be accessed programmatically using very simple pure-Matlab code...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/specialized-matlab-plots" rel="bookmark" title="Specialized Matlab plots">Specialized Matlab plots </a> <small>The new MathWorks Plot Gallery provides access to some plotting examples on the File Exchange. Numerous others are available, extending the customizability of Matlab graphics. ...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/mathworks-blogs-facelift/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Removing user preferences from deployed apps</title>
		<link>https://undocumentedmatlab.com/articles/removing-user-preferences-from-deployed-apps?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=removing-user-preferences-from-deployed-apps</link>
					<comments>https://undocumentedmatlab.com/articles/removing-user-preferences-from-deployed-apps#respond</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 07 Nov 2012 18:00:19 +0000</pubDate>
				<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Undocumented feature]]></category>
		<category><![CDATA[Compiler]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Mathworks.com]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3302</guid>

					<description><![CDATA[<p>An unsupported MathWorks Technical Solution explains how to remove private information from deployed (compiled) matlab applications. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/removing-user-preferences-from-deployed-apps">Removing user preferences from deployed apps</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/using-pure-java-gui-in-deployed-matlab-apps" rel="bookmark" title="Using pure Java GUI in deployed Matlab apps">Using pure Java GUI in deployed Matlab apps </a> <small>Using pure-Java GUI in deployed Matlab apps requires a special yet simple adaptation. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/changing-system-preferences-programmatically" rel="bookmark" title="Changing system preferences programmatically">Changing system preferences programmatically </a> <small>Matlab user/system preferences can be changed programmatically, from within your Matlab application or from the Matlab desktop command prompt. This post details how....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/splash-window-for-deployed-applications" rel="bookmark" title="Splash window for deployed applications">Splash window for deployed applications </a> <small>Deployed (compiled) Matlab applications take a long time to load. I present a splash window that loads immadiately, solving this problem. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/speeding-up-compiled-apps-startup" rel="bookmark" title="Speeding up compiled apps startup">Speeding up compiled apps startup </a> <small>The MCR_CACHE_ROOT environment variable can reportedly help to speed-up deployed Matlab executables....</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Every now and then I stumble upon a MathWorks <a target="_blank" rel="nofollow" href="http://www.mathworks.com/support/product/technical-solutions-index.html">technical note/solution</a> that uses undocumented features. I already posted a few of these here (e.g., <a target="_blank" rel="nofollow" href="http://www.mathworks.com/support/solutions/en/data/1-3SR0YI/">this one</a> for the <a target="_blank" href="/articles/continuous-slider-callback/">continuous slider movement</a> issue, and <a target="_blank" rel="nofollow" href="http://www.mathworks.com/support/solutions/en/data/1-3MY8PN/">this one</a> for the <a target="_blank" href="/articles/minimize-maximize-figure-window/">figure maximization/minimization</a> issue). In fact, you may be surprised to know that there are dozens of other official technical notes, solutions and articles that use undocumented/unsupported Matlab functionality. Yummy!<br />
Of the numerous official resources containing unofficial information (I can&#8217;t help but smile), do you have a personal favorite? If so, please post a link in a <a href="/articles/removing-user-preferences-from-deployed-apps/#respond">comment</a> below, with a short description of what it is about.<br />
Today, I show one such technical solution (<a target="_blank" rel="nofollow" href="http://www.mathworks.com/support/solutions/en/data/1-1UOGW7/">http://www.mathworks.com/support/solutions/en/data/1-1UOGW7/</a>) that solves a privacy issue in deployed (compiled) Matlab applications. IMHO, the privacy issue is generally harmless, but users can judge by themselves. Obviously, if someone is stupid enough to store real secret information in the Matlab preferences, then the privacy issue could become more important.<br />
<span id="more-3302"></span><br />
The solution refers to Matlab release 7.1 (R14SP3), but is also relevant for later releases. I will let the text speak for itself:</p>
<blockquote><p><i></p>
<h4>When I execute an application compiled using MATLAB Compiler 4.3 (R14SP3), how can I prevent personal information such as my MATLAB preferences information from being extracted?</h4>
<h3 id="problem">Problem Description:</h3>
<p>I have compiled an application &#8216;test&#8217; using MATLAB Compiler 4.3 (R14SP3). Upon execution I noticed that a new folder gets created in the &#8216;test_mcr&#8217; folder. This folder is named &#8216;test_<string of numbers and letters>&#8216;.<br />
Opening this folder revealed that some of the files were stored in my MATLAB preferences directory, including my MATLAB preferences file.<br />
I want to know if there is any way to avoid the creation of this directory when my application executes.</p>
<h3 id="solution">Solution:</h3>
<p>It is not possible to avoid having MATLAB Compiler include the preferences directory in each compiled application. The Compiler includes the user&#8217;s preference information because the application may rely on it. There are two possible workarounds:<br />
1) On UNIX, use SETENV and the ! operator to compile. For example:</p>
<pre lang='matlab'>
!setenv MATLAB_PREFDIR /tmp/emptydir;
mcc -Nmgv test
</pre>
<p>On Windows, open a DOS command window and execute</p>
<pre lang='dos'>set -- USERPROFILE = C:\Temp\emptydir</pre>
<p>Start MATLAB from this DOS prompt (to use the appropriate environment variable in the MATLAB session) and execute the MCC command at the MATLAB command prompt.<br />
Note: If you are using MATLAB Compiler 4.4 (R2006a) you can also use the SETENV function at the MATLAB command prompt</p>
<pre lang='matlab'>
setenv('-- USERPROFILE','C:\Temp\emptydir');
mcc -Nmgv test
</pre>
<p>This temporarily sets the preference directory to /tmp/emptydir or C:\Temp\emptydir, and the compiled application will therefore only have the default settings (or the preference directory settings from your installation of MATLAB 7.0.4 (R14SP2)).<br />
2) Move the contents of the preference directory, or rename the directory, before compilation, and restore afterwards. To do this on Windows, for example, execute the following command to compile the function test.m:</p>
<pre lang='matlab'>mymcc -m test.m</pre>
<p>The code of the function mymcc is:</p>
<pre lang='matlab'>function mymcc(varargin)
% MYMCC does the same as MCC. The only difference is that the created
% application doesn't contain information of the MATLAB
% prefdir anymore.
%
% For the description of possible options please look at the help of
% the command MCC.
command = 'mcc ';
for i = 1 : length(varargin)
   command = [command,varargin{i},' '];
end
a = prefdir;
b = regexp(a,'\','start');
c = a(b(end)+1:end);
p = cd;
cd(prefdir)
cd ..
!md tmp
cd(prefdir)
!move * ../tmp
cd(p)
% Because of the displacement MATLAB cannot access the saved preferences
% and that's why you have to indicate each time, which compiler shall be used.
try
   eval(command);
catch
   warning('WarnTests:Warning', ...
           'Calling mcc causes Error. Please check your input arguments.\n No file was compiled ...\n')
end
cd(prefdir)
cd ..
cd tmp
eval(['!move * ../',c]);
cd ..
!rmdir tmp
cd(p);
</pre>
<p>A similar function could also be written for the UNIX platform.</string></i><br />
<b>Note that the above workaround is not officially supported by MathWorks.</b><br />
<i></p>
<h3 id="related">Related Solutions:</h3>
<p><a target="_blank" rel="nofollow" href="http://www.mathworks.com/support/solutions/en/data/1-9BKF3F/">Why are my preference files included in my stand-alone application created with MATLAB Compiler 4.9 (R2008b)?</a><br />
Problem Description:<br />
If I look in the cache folder that my compiled application creates, I can see that the .matlab folder contains my preference files with my last development activities in plain text. The files are: cwdhistory.m, history.m, matlab.prf, MATLAB_Editor_State.xml, etc. How can I avoid the inclusion of these files in the stand-alone application?<br />
Solution:<br />
The stand-alone does not include your preference files. You can see the preference files in the cache folder because you are running the stand-alone in your development environment. At runtime, the stand-alone determines those preferences from a local MATLAB installation and copies them to the cache folder for it&#8217;s own use. If you run your stand-alone application on a machine without a MATLAB installation, you will see that the cache folder does not contain your preference files.<br />
</i></p></blockquote>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/removing-user-preferences-from-deployed-apps">Removing user preferences from deployed apps</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/using-pure-java-gui-in-deployed-matlab-apps" rel="bookmark" title="Using pure Java GUI in deployed Matlab apps">Using pure Java GUI in deployed Matlab apps </a> <small>Using pure-Java GUI in deployed Matlab apps requires a special yet simple adaptation. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/changing-system-preferences-programmatically" rel="bookmark" title="Changing system preferences programmatically">Changing system preferences programmatically </a> <small>Matlab user/system preferences can be changed programmatically, from within your Matlab application or from the Matlab desktop command prompt. This post details how....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/splash-window-for-deployed-applications" rel="bookmark" title="Splash window for deployed applications">Splash window for deployed applications </a> <small>Deployed (compiled) Matlab applications take a long time to load. I present a splash window that loads immadiately, solving this problem. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/speeding-up-compiled-apps-startup" rel="bookmark" title="Speeding up compiled apps startup">Speeding up compiled apps startup </a> <small>The MCR_CACHE_ROOT environment variable can reportedly help to speed-up deployed Matlab executables....</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/removing-user-preferences-from-deployed-apps/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Changes in the online doc URLs</title>
		<link>https://undocumentedmatlab.com/articles/changes-in-the-online-doc-urls?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=changes-in-the-online-doc-urls</link>
					<comments>https://undocumentedmatlab.com/articles/changes-in-the-online-doc-urls#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 10 Oct 2012 18:00:57 +0000</pubDate>
				<category><![CDATA[Low risk of breaking in future versions]]></category>
		<category><![CDATA[Stock Matlab function]]></category>
		<category><![CDATA[Undocumented feature]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Mathworks.com]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=3224</guid>

					<description><![CDATA[<p>Matlab release R2012b has broken a vast number of links to its online documentation pages. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/changes-in-the-online-doc-urls">Changes in the online doc URLs</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/online-web-based-matlab" rel="bookmark" title="Online (web-based) Matlab">Online (web-based) Matlab </a> <small>Matlab Online is a MathWorks product that enables running Matlab applications via a full-fledged web interface. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/advanced-matlab-online-webinars" rel="bookmark" title="Advanced Matlab online webinars">Advanced Matlab online webinars </a> <small>Several live online webinars on advanced Matlab programming will be presented in September-October 2017. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/customizing-help-popup-contents" rel="bookmark" title="Customizing help popup contents">Customizing help popup contents </a> <small>The built-in HelpPopup, available since Matlab R2007b, has a back-door that enables displaying arbitrary text, HTML and URL web-pages....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/docs-of-old-matlab-releases" rel="bookmark" title="Docs of old Matlab releases">Docs of old Matlab releases </a> <small>MathWorks recently posted archived documentation for many previous Matlab releases...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Along with the extensive facelift done to Matlab&#8217;s documentation system in R2012b, one important aspect has gone largely unnoticed. Apparently, in the interest of making the doc pages more <a target="_blank" rel="nofollow" href="http://en.wikipedia.org/wiki/Search_engine_optimization">SEO</a>-friendly, MathWorks have modified the online documentation URLs from something that looks like http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html to <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/matlab/creating_guis/writing-code-for-callbacks.html">http://www.mathworks.com/help/matlab/creating_guis/writing-code-for-callbacks.html</a>.</p>
<h3 id="problem">The problem</h3>
<p>This change in itself is actually a good idea, but what is absolutely disastrous (IMHO) is the fact that MathWorks have not bothered to link all the old URLs to the new ones. Most serious websites that have tons of links floating around for a decade or two, as in this case, take the trouble to automatically redirect old URLs to the new ones in the server side. This was the case, for example, when Oracle took over Sun a couple of years ago and redirected the Java links. So did Microsoft in their online MSDN. Neither Oracle nor Microsoft redirected all the URLs perfectly, but they made a pretty good effort. Not in Matlab&#8217;s case, unfortunately.<br />
It seems that only the basic function reference pages have been redirected, not any of the other doc pages. Tons of links, many of them in MathWorks webpages themselves, are now broken and lead to a generic &#8220;page not found&#8221; webpage. This includes many thousands of links referenced by loyal community users in response to queries in the Matlab CSSM newsgroup (in the past ~15 years) and MathWork&#8217;s own Answers forum (past 1.5 years), not to mention numerous references in books, reports, websites and other resources. These links are now broken. Users who use them will end up in page-not-found. How user-friendly would this be for them? How likely do you think they would use the newsgroup/forum again, as opposed to flooding MathWorks customer support with simple questions that have already been answered online, only to be rendered unusable by an SEO fix that should have been fully transparent?! How likely do you think that loyal CSSM/Answers contributors would post MathWorks links again?! This is about as self-defeating a release as I have seen in a very long time.<br />
In the past, I have highlighted changes to the online documentation center that I found useful. These included the addition of <a target="_blank" href="/articles/docs-of-old-matlab-releases/">historical documentation archives</a>, and the <a target="_blank" href="/articles/specialized-matlab-plots/">plot gallery</a>. But today I must say that IMHO the latest change to the doc center should never have gone live, and I fail to understand how it could ever have passed internal QA. Furthermore, I cannot understand why this is still not fixed, a month after the official release.<br />
I don&#8217;t believe that I have ever used such strong language in the 3.5 years that this blog has been live, and I do this very reluctantly now. Hopefully my call for action will be heeded (soon!).</p>
<h3 id="workaround">So what can be done?</h3>
<p>MathWorks can and should correct this problem by adding the server-side redirects, which is typically accompanied by an <a target="_blank" rel="nofollow" href="http://en.wikipedia.org/wiki/HTTP_301">HTTP 301 <i>Moved Permanently</i></a> response to the requesting browser. In fact, doing this is also good for SEO, since all the tons of old links will be counted by search engines as directing to the new pages, thereby adding incoming page-rank &#8220;juice&#8221; to them. Here&#8217;s <a target="_blank" rel="nofollow" href="http://support.google.com/webmasters/bin/answer.py?hl=en&#038;answer=93633">Google&#8217;s advise</a> on this matter.<br />
Doing these redirects does not require a Matlab release and can be done immediately and incrementally. Granted it&#8217;s not a simple task, given the huge number of URLs involved, but the sooner MathWorks start, the faster they&#8217;ll finish. Frankly, they should have thought about it in advance&#8230; I have a hunch that the servers&#8217; HTTP 404 (<i>Page Not Found</i>) list has exploded since the latest release. I would suggest going through this list, sorted down by number of occurrences, so that the most frequently-accessed webpages are fixed first.<br />
Until the URLs are restored or redirected, we can try the following workaround:<br />
<span id="more-3224"></span></p>
<ol>
<li>First try the URL directly (e.g., <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html">http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html</a>) &#8211; who knows, maybe it will work by the time you try using it&#8230;</li>
<li>If the URL that doesn&#8217;t work, try to add <b>releases/R2012a/</b> following the &#8220;help/&#8221; term in the URL. In our example: <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/releases/R2012a/techdoc/creating_guis/f16-999606.html">http://www.mathworks.com/help/<b>releases/R2012a/</b>techdoc/creating_guis/f16-999606.html</a>. If successful, jump to <a href="/articles/changes-in-the-online-doc-urls/#read">step #4 below</a>.
	</li>
<li>If the URL is still not found, enter it into the <i>Way-Back Machine</i> in the following format: <i>http://wayback.archive.org/web/*/&lt;URL&gt;</i>. For example: <a target="_blank" rel="nofollow" href="http://wayback.archive.org/web/*/http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html">http://wayback.archive.org/web/*/http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html</a><br />
	If we&#8217;re lucky, the Way-Back archive has at least one archived copy of the requested webpage. This also happens to be the case in this specific instance:<br />
<center><figure style="width: 615px" class="wp-caption aligncenter"><img decoding="async" alt="Way-Back Machine's archived versions of a webpage" src="https://undocumentedmatlab.com/images/wayback_archive.png" title="Way-Back Machine's archived versions of a webpage" width="615" /><figcaption class="wp-caption-text">Way-Back Machine's archived versions of a webpage</figcaption></figure></center> Click the highlighted date (when an archive copy was taken) to see our requested webpage in all its past glory. We are not assured that it is the latest version of the webpage, but this is ok for now.
</li>
<li id="read">If all you need is to read the contents of the doc page, then you can stop here. But if you also wish to get the new URL (in its R2012b SEO format), then read on:</li>
<li>Copy a long distinctive sentence from the webpage content in to the clipboard; paste into Google within &#8220;&#8221; (quotation marks) and add the term &#8220;site:mathworks.com&#8221;. In our case, let&#8217;s take &#8220;<i>A callback is a function that you write and associate with a specific component in the GUI</i>&#8220;. Here is the corresponding Google query: <a target="_blank" rel="nofollow" href="https://www.google.com/#hl=en&#038;q=site:mathworks.com+%22A+callback+is+a+function+that+you+write+and+associate+with+a+specific+component+in+the+GUI%22">site:mathworks.com &#8220;A callback is a function that you write and associate with a specific component in the GUI&#8221;</a>.</li>
<li>If we are lucky again, Google should turn up the new webpage and by navigating there we should (finally!) get the new URL. In this case, the requested URL is the top answer: <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/matlab/creating_guis/writing-code-for-callbacks.html">http://www.mathworks.com/help/matlab/creating_guis/writing-code-for-callbacks.html</a></li>
<li>Sometimes Google fails to find the sentence in the Mathworks.com website. This can be due to text changes that MathWorks do in their doc pages from time to time. Don&#8217;t give up &#8211; try a different sentence from the archived webpage, maybe it will show up instead. You can also try to enter the page title as the distinctive sentence. There is a good chance that at least one of these will work. In our specific example, MathWorks changed the title from &#8220;<i>Writing Code for Callbacks</i>&#8221; to &#8220;<i>Write Code for Callbacks</i>&#8221; in R2011b (after the Way-Back Machine archived the page). Luckily, the <a target="_blank" rel="nofollow" href="https://www.google.com/#hl=en&#038;q=site:mathworks.com+%22Writing Code for Callbacks%22">title query</a> still manages to find the new page in this specific case (good ol&#8217; dependable Google!).
	</li>
<li>Any of the above may fail, typically because the Way-Back archive did not archive the specific page we need, or because MathWorks changed the page contents too much. In such a case, too bad for us&#8230; In this case, I suggest you email MathWorks to ask for the new URL.</li>
</ol>
<h3 id="followups">Followups</h3>
<p>Vociferous complaints over the new documentation system in R2012a have been heard loud and clear at MathWorks. Wendy Fullam, Matlab&#8217;s documentation product manager, has made a point to <a target="_blank" rel="nofollow" href="https://www.mathworks.com/matlabcentral/newsreader/view_thread/323532#888866">make it clear</a> that MathWorks is not ignoring these out-of-the-ordinary complaints and will indeed improve the documentation accordingly. Wendy also <a target="_blank" rel="nofollow" href="http://www.mathworks.com/matlabcentral/answers/48070-experiences-with-release-2012b#answer_60136">responded</a> to my SEO complaint, saying that they will indeed try to fix the URL redirects:</p>
<blockquote><p>However some pages have not been redirected for various reasons. Given feedback like this, we are looking into creating more redirects as soon as possible.</p></blockquote>
<p>I&#8217;m holding my fingers that they will indeed fix this issue, not just for some URLs (as the quote above seems to indicate) but for all of them. MathWorks&#8217; quick and serious response to the complaints on R2012b make me optimistic that there is indeed a good chance that this will be resolved soon. I&#8217;ll be following up on this issue in the upcoming months, and will be most happy to post an update here if and when this issue is fully resolved as it should be, on the MathWorks server side.<br />
<u><b>Addendum Oct 14, 2012</b></u> (that was quick!): Wendy Fullam has <a target="_blank" rel="nofollow" href="https://www.mathworks.com/matlabcentral/newsreader/view_thread/323532#889541">posted</a> the following comment on the relevant CSSM thread (snipped for brevity):</p>
<blockquote><p>In response to customer feedback, MathWorks is deploying an additional 700 redirects for documentation URLs.<br />
When combined with the redirects already deployed (for reference pages, landing pages, installation sections, and release notes), we will be redirecting roughly 70% of R2012a documentation URLs to updated page locations.<br />
We will also continue to monitor &#8220;page not found&#8221; reports, and establish additional redirects as needed.<br />
Additionally, I&#8217;d like to note that the discussion has been incredibly insightful in helping the documentation team establish future direction. Customers noted that the doc appears to have undergone a change in organization and have speculated on the motivation. While <a target="_blank" rel="nofollow" href="http://en.wikipedia.org/wiki/Search_engine_optimization">SEO</a> was part of our motivation (we think it&#8217;s a big step in having URLs provide an indication of page focus), we are also working towards serving up information to support common customer workflows. &#8230; I want to encourage you all to continue to share experiences and requests for missing information, so our documentation team can continue to expand and improve our content.</p></blockquote>
<p><u><b>Addendum Nov 19, 2012</b></u>: Looks like the <a target="_blank" rel="nofollow" href="http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html">http://www.mathworks.com/help/techdoc/creating_guis/f16-999606.html</a> link is alive again, or rather redirected to the new location which is great. I hope this means that the redirection effort mentioned by Wendy above has finally occured. Thanks Wendy (and all the nameless others behind the scenes)!</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/changes-in-the-online-doc-urls">Changes in the online doc URLs</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/online-web-based-matlab" rel="bookmark" title="Online (web-based) Matlab">Online (web-based) Matlab </a> <small>Matlab Online is a MathWorks product that enables running Matlab applications via a full-fledged web interface. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/advanced-matlab-online-webinars" rel="bookmark" title="Advanced Matlab online webinars">Advanced Matlab online webinars </a> <small>Several live online webinars on advanced Matlab programming will be presented in September-October 2017. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/customizing-help-popup-contents" rel="bookmark" title="Customizing help popup contents">Customizing help popup contents </a> <small>The built-in HelpPopup, available since Matlab R2007b, has a back-door that enables displaying arbitrary text, HTML and URL web-pages....</small></li>
<li><a href="https://undocumentedmatlab.com/articles/docs-of-old-matlab-releases" rel="bookmark" title="Docs of old Matlab releases">Docs of old Matlab releases </a> <small>MathWorks recently posted archived documentation for many previous Matlab releases...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/changes-in-the-online-doc-urls/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
