<?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>MATLAB pour les geeks &#187; Tips and Tricks</title>
	<atom:link href="https://blog.developpez.com/matlab4geek/?cat=46&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/matlab4geek</link>
	<description>&#62;&#62;why(393) </description>
	<lastBuildDate>Fri, 09 Jan 2015 13:05:12 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>Chut!</title>
		<link>https://blog.developpez.com/matlab4geek/?p=748</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=748#comments</comments>
		<pubDate>Thu, 07 Feb 2013 08:57:08 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Best-of des commandes MATLAB utiles]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[echo off]]></category>
		<category><![CDATA[evalc]]></category>
		<category><![CDATA[fprintf]]></category>
		<category><![CDATA[mute]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=748</guid>
		<description><![CDATA[ou comment faire taire MATLAB ?! J&#8217;avais écris un logiciel avec pleins de fprintf afin de pouvoir créer un log avec diary. Evidemment ça ralentit le process le fait de faire afficher pleins de lignes dans le Command Window. Là l&#8217;idée c&#8217;était de pouvoir ajouter une option qui fasse que les fprintf n&#8217;affichent rien. J&#8217;aurais [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>ou comment faire taire MATLAB ?!<br />
J&rsquo;avais écris un logiciel avec <strong>pleins de fprintf </strong> afin de pouvoir créer un log avec diary.<br />
Evidemment ça ralentit le process le fait de faire afficher pleins de lignes dans le Command Window.<br />
Là l&rsquo;idée c&rsquo;était de pouvoir ajouter une option qui fasse que les fprintf n&rsquo;affichent rien.<br />
J&rsquo;aurais pu rajouter une checkbox dans l&rsquo;interface que j&rsquo;aurais appelée &laquo;&nbsp;verbosity&nbsp;&raquo; . Si cette checkbow n&rsquo;était pas cochée , cela signifait que l&rsquo;opérateur ne voulait rien voir à l&rsquo;écran.<br />
Mais bon vu que j&rsquo;en avais plus de 3000 lignes de fprintf je n&rsquo;avais pas envie de faire 300 if-test du style:</p>
<div class="codecolorer-container matlab default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="matlab codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">if</span> verbosity <span style="color: #228B22;">% checkbox has value 1</span><br />
<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fprintf.html"><span style="color: #0000FF;">fprintf</span></a><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'\n ...'</span><span style="color: #080;">&#41;</span><br />
<span style="color: #0000FF;">end</span></div></div>
<p>La solution est en fait toute simple et ne requière aucune modification de code &#8230; (solution page suivante ) <span id="more-748"></span></p>
<p>il suffit d&rsquo;utilser <strong>evalc</strong></p>
<p>Prenons un exemple simple où il n&rsquo;ya que 2 fprintf (et pas 3000 comme dans mon cas)</p>
<div class="codecolorer-container matlab default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="matlab codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000FF;">function</span> &nbsp;y = matlab4geek<span style="color: #080;">&#40;</span>x<span style="color: #080;">&#41;</span><br />
<span style="color: #228B22;">% dummy code to multiply by 3 an input</span><br />
<span style="color: #228B22;">%</span><br />
<span style="color: #228B22;">% Input : numerical value</span><br />
<span style="color: #228B22;">% Output : input multiplied by 3</span><br />
<span style="color: #228B22;">%</span><br />
<span style="color: #228B22;">% Example : y = matlabgeek(2) will return 6</span><br />
<span style="color: #228B22;">%</span><br />
<span style="color: #228B22;">% See also why(393)</span><br />
<span style="color: #228B22;">%</span><br />
<span style="color: #228B22;">% Create Date : 07-Feb-2013</span><br />
<span style="color: #228B22;">% Author : Aurelien QUEFFURUST</span><br />
<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fprintf.html"><span style="color: #0000FF;">fprintf</span></a><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'\n %s'</span>,<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/datestr.html"><span style="color: #0000FF;">datestr</span></a><span style="color: #080;">&#40;</span><a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/now.html"><span style="color: #0000FF;">now</span></a><span style="color: #080;">&#41;</span><span style="color: #080;">&#41;</span><br />
<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fprintf.html"><span style="color: #0000FF;">fprintf</span></a><span style="color: #080;">&#40;</span><span style="color:#A020F0;">'\n input x :%d\n'</span>,x<span style="color: #080;">&#41;</span><br />
y = x*<span style="color: #33f;">3</span>;</div></div>
<p>Si je l&rsquo;execute il va m&rsquo;afficher :</p>
<blockquote><p>&gt;&gt;y = matlab4geek(2)</p>
<p> 07-Feb-2013 09:51:01<br />
 input x :2</p>
<p>y =</p>
<p>     6</p></blockquote>
<p>Mais pour le faire taire il suffit de faire:</p>
<blockquote><p>[blablabla,y] = evalc(&lsquo;matlab4geek(2)&rsquo;);</p></blockquote>
<p>Le ; est très important !</p>
<p>blablabla vous l&rsquo;aurez compris aura capturé les lignes et y la valeur que je souhaite récupérer.</p>
<p>Bref donc le gars qui veut utiliser mon soft sans display il n&rsquo;a qu&rsquo;à l&rsquo;appler via evalc et moi ça m&rsquo;évite 3000 if-else à  implémenter <img src="https://blog.developpez.com/matlab4geek/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>accumarray</title>
		<link>https://blog.developpez.com/matlab4geek/?p=687</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=687#comments</comments>
		<pubDate>Tue, 30 Oct 2012 12:17:13 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[pensée MATLAB  du jour]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[accumarray]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=687</guid>
		<description><![CDATA[En juillet 2012, j&#8217;ai ENFIN trouvé l&#8217;utilité d&#8217;utiliser accumarray&#8230; les boules pour un MATLAB geek ! Cette fonction a été introduite avec MATLAB 7.0 (R14) en même temps que les fonctions cast, intmax, intmin,&#8230;. donc il était temps de s&#8217;y coller. Je m&#8217;étais même promis d&#8217;y arriver dans ce billet Mon premier arrayfun. Exemple simple [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>En juillet 2012, j&rsquo;ai ENFIN trouvé l&rsquo;utilité d&rsquo;utiliser <strong>accumarray</strong>&#8230; les boules pour un MATLAB geek ! Cette fonction a été introduite avec MATLAB 7.0 (R14) en même temps que les fonctions cast, intmax, intmin,&#8230;. donc il était temps de s&rsquo;y coller.</p>
<p> Je m&rsquo;étais même promis d&rsquo;y arriver dans ce billet  <a href="http://blog.developpez.com/matlab4geek/?p=63&amp;page=2" target="_blank">Mon premier arrayfun</a>.</p>
<ul>
<li>
Exemple simple :</li>
</ul>
<p>Cette matrice là par exemple 2 lignes et 3 colonnes :</p>
<blockquote><p>
B =  [0     0     0<br />
      0     0   -13]
</p></blockquote>
<p>On pourrait l&rsquo;écrire en une ligne en faisant</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">B(2,3) = -13</div></div>
<p>mais truc de fou on peut aussi l&rsquo;écrire en faisant:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">accumarray([2,3],-13)</div></div>
<ul>
<li>Maintenant avec un exemple plus compliqué</li>
</ul>
<p><span id="more-687"></span></p>
<p>Imaginons qu&rsquo;on veuille remplir une matrice 5 lignes et 4 colonnes comme ci-dessous:</p>
<p>     0     0     0     0<br />
     8     0     0     0<br />
     8     0     0     8<br />
     0     0     0     0<br />
     0     0     0     8</p>
<p>Donc on a le chiffre 8 :<br />
 en ligne 2 colonne 1<br />
 en ligne 3 colonne 1 et 4<br />
 et en ligne 5 colonne 4</p>
<p>On écrira donc sous MATLAB :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">chiffre = 8;<br />
ligne = [ 2 3 3 5 ];<br />
colonne = [ 1 1 4 4 ];<br />
accumarray([ligne(:),colonne(:)],chiffre)</div></div>
<p>bon moi je m&rsquo;en sers ainsi et je pense que j&rsquo;ai détourné l&rsquo;idée de base d&rsquo;<a href="http://www.mathworks.com/help/releases/R2011b/techdoc/ref/accumarray.html" target="_blank">accumarray</a> (Construct array with accumulation)</p>
<p>A vrai dire les exemples de la doc me sortent des yeux et je ne vois pas comment les utiliser dans la pratique.<br />
Donc si vous avez d&rsquo;autres exemple pratiques , je suis preneur! </p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MathWorks Certification Program</title>
		<link>https://blog.developpez.com/matlab4geek/?p=561</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=561#comments</comments>
		<pubDate>Mon, 22 Oct 2012 08:25:52 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[diplome]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=561</guid>
		<description><![CDATA[Si vous souhaitez être certifié comme un MATLAB geek alors voici le diplôme officiel qu&#8217;il vous faut: Il n&#8217;y pas encore de session en France &#8230;dommage , ça se passe en Angleterre ou en Allemagne dans les bureaux de MathWorks. Plus d&#8217;infos ici]]></description>
				<content:encoded><![CDATA[<p>Si vous souhaitez être certifié comme un MATLAB geek alors voici le diplôme officiel  qu&rsquo;il vous faut:</p>
<p><a href="http://blog.developpez.com/matlab4geek/files/2012/10/MathWorks-Certification-Program.png"><img src="http://blog.developpez.com/matlab4geek/files/2012/10/MathWorks-Certification-Program.png" alt="" width="663" height="501" class="alignnone size-full wp-image-562" /></a></p>
<p>Il n&rsquo;y pas encore de session en France &#8230;dommage , ça se passe en Angleterre ou en Allemagne dans les bureaux de MathWorks. Plus d&rsquo;infos <a href="http://www.mathworks.fr/services/training/certification/index.html?s_iid=main_training_ML_news" target="_blank">ici</a> </p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiler du Fortran sous Linux</title>
		<link>https://blog.developpez.com/matlab4geek/?p=480</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=480#comments</comments>
		<pubDate>Fri, 19 Oct 2012 07:57:51 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[gfortran]]></category>
		<category><![CDATA[GFORTRAN_1.4]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mex]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=480</guid>
		<description><![CDATA[Compiler du Fortran sous Linux m&#8217;a l&#8217;air beaucoup plus simple que sous Windows ! En revanche je me suis chopé l&#8217;erreur suivante: version `GFORTRAN_1.4&#8242; not found Voici l&#8217;erreur que j&#8217;ai eue en R2011b, R2012a et R2012b après avoir mexé avec succès : /usr/local/MATLAB/R2012b/bin/glnxa64/../../sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4&#8242; not found La solution qui fonctionne pour Ubuntu 11.10 (Oneiric [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Compiler du Fortran sous Linux m&rsquo;a l&rsquo;air beaucoup plus simple que sous Windows !</p>
<p>En revanche je me suis chopé l&rsquo;erreur suivante: </p>
<ul>
<strong>version `GFORTRAN_1.4&prime; not found</strong></ul>
<p>Voici l&rsquo;erreur que j&rsquo;ai eue en R2011b, R2012a et R2012b après avoir mexé avec succès :</p>
<blockquote><p>/usr/local/MATLAB/R2012b/bin/glnxa64/../../sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4&prime; not found</p></blockquote>
<p><span id="more-480"></span><br />
La solution qui fonctionne pour <strong>Ubuntu 11.10 (Oneiric Ocelot) et Ubuntu 12.04 (Precise Pangolin) </strong> :</p>
<p>Vous localisez la version 3.0.0 en faisant dans un terminal</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">locate libgfortran</div></div>
<p>moi c&rsquo;était  sous 64-bits :</p>
<blockquote><p>/usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 </p></blockquote>
<p>en 32-bits ce serait :</p>
<blockquote><p>/usr/lib/i386-linux-gnu/libgfortran.so.3.0.0 </p></blockquote>
<p>bref ensuite vous faites le lien vers matlabroot/sys/os/glnxa64/libgfortran.so.3 :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo ln -sf /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 /usr/local/MATLAB/R2012b/sys/os/glnxa64/libgfortran.so.3</div></div>
<p>et c&rsquo;est gagné!<br />
Sous Ubuntu 10.10 , 11.04 en revanche non <img src="https://blog.developpez.com/matlab4geek/wp-includes/images/smilies/icon_sad.gif" alt=":(" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problème de font sous Ubuntu 12.04</title>
		<link>https://blog.developpez.com/matlab4geek/?p=551</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=551#comments</comments>
		<pubDate>Wed, 17 Oct 2012 09:48:23 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[fontsize]]></category>
		<category><![CDATA[fontweight]]></category>
		<category><![CDATA[gras]]></category>
		<category><![CDATA[taille]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=551</guid>
		<description><![CDATA[En R2011b , R2012b &#8230; sous Ubuntu 12.04 bref changer la taille via fontsize ou mettre en gras via fontweight n&#8217;a pas d&#8217;effet La solution est la suivante : sudo apt-get install xfonts-100dpi xfonts-75dpi &#8230; de rien]]></description>
				<content:encoded><![CDATA[<p>En R2011b , R2012b &#8230;<br />
sous <strong>Ubuntu 12.04</strong> bref changer la taille via <strong>fontsize</strong> ou mettre en gras via <strong>fontweight</strong> n&rsquo;a pas d&rsquo;effet</p>
<p>La solution est la suivante :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo apt-get install xfonts-100dpi xfonts-75dpi</div></div>
<p>&#8230; de rien </p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler du Fortran sous Windows (part2)</title>
		<link>https://blog.developpez.com/matlab4geek/?p=512</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=512#comments</comments>
		<pubDate>Tue, 16 Oct 2012 07:03:40 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[R2012b]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[compilateur]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[Composer XE 2011 SP1]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[ifort]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[intel visual fortran]]></category>
		<category><![CDATA[mex]]></category>
		<category><![CDATA[MEX-files]]></category>
		<category><![CDATA[Microsoft Software Development Kit]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=512</guid>
		<description><![CDATA[Suite de mon article Compiler du Fortran sous Windows il y a maintenant un bug report (très succinct à mon gout vu qu&#8217;il ne donne pas de solution) : In MATLAB 8.0 (R2012b), mex -setup cannont find Intel Visual Fortran Composer XE 2011 with Windows SDK 7.1 compiler on 32-bit Windows.]]></description>
				<content:encoded><![CDATA[<p>Suite de mon article <a href="http://blog.developpez.com/matlab4geek/?p=419" target="_blank">Compiler du Fortran sous Windows</a> il y a maintenant un bug report (très succinct à mon gout vu qu&rsquo;il ne donne pas de solution)  : <a href="http://www.mathworks.com/support/bugreports/877961" target="_blank">In MATLAB 8.0 (R2012b), mex -setup cannont find Intel Visual Fortran Composer XE 2011 with Windows SDK 7.1 compiler on 32-bit Windows.</a> </p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doc en R2012b</title>
		<link>https://blog.developpez.com/matlab4geek/?p=491</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=491#comments</comments>
		<pubDate>Thu, 11 Oct 2012 07:25:50 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[doc]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[htmlrenderer]]></category>
		<category><![CDATA[r2012b]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=491</guid>
		<description><![CDATA[Parce que vous n&#8217;aimez pas le nouveau format HTML de la doc en R2012b, parce que vous trouvez que c&#8217;est lent ou que ça gèle votre MATLAB , vous avez envie de retrouver l&#8217;ancien format HTML . Voici la commande magique : com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('HTMLRENDERER') Ca fait disparaitre le champ Documentation Location : cette option est automatiquement [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Parce que vous n&rsquo;aimez pas le nouveau format HTML de la doc en R2012b, parce que vous trouvez que c&rsquo;est lent ou que ça gèle votre MATLAB , vous avez envie de retrouver l&rsquo;ancien format HTML . </p>
<p>Voici la commande magique :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('HTMLRENDERER')</div></div>
<p><span id="more-491"></span></p>
<p>Ca fait disparaitre le champ <strong>Documentation Location</strong> : </p>
<p><a href="http://blog.developpez.com/matlab4geek/files/2012/10/r2012bdoc_oldshooll.png"><img src="http://blog.developpez.com/matlab4geek/files/2012/10/r2012bdoc_oldshooll.png" alt="" width="640" height="640" class="alignnone size-full wp-image-493" /></a></p>
<p>cette option est automatiquement sauvegardée à chaque session MATLAB.</p>
<p>Pour revenir à la version officielle R2012b , remplacer &lsquo;<strong>HTMLRENDERER</strong>&lsquo; par une chaine vide :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('')</div></div>
<p>ce qui fait réapparaitre le champ Documentation Location : </p>
<p><a href="http://blog.developpez.com/matlab4geek/files/2012/10/r2012bdoc.png"><img src="http://blog.developpez.com/matlab4geek/files/2012/10/r2012bdoc.png" alt="" width="640" height="640" class="alignnone size-full wp-image-495" /></a></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiler du Fortran sous Windows</title>
		<link>https://blog.developpez.com/matlab4geek/?p=419</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=419#comments</comments>
		<pubDate>Wed, 10 Oct 2012 07:20:14 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[R2011b]]></category>
		<category><![CDATA[R2012b]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[compilateur]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[Composer XE 2011 SP1]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[ifort]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[intel visual fortran]]></category>
		<category><![CDATA[mex]]></category>
		<category><![CDATA[MEX-files]]></category>
		<category><![CDATA[Microsoft Software Development Kit]]></category>
		<category><![CDATA[SDK]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=419</guid>
		<description><![CDATA[Compiler du Fortran sous Windows : Situation : - Windows XP 32-bit &#8211; 2 versions MATLAB R2011b et R2012b Pour faire simple , sans le support technique de MathWorks, il est impossible de compiler par exemple l&#8217;exemple timestwo.F ([matlabroot &#8216;\extern\examples\refbook\timestwo.F&#8217;]). Donc un grand merci au gars qui m&#8217;a aidé!! &#8230; entre nous c&#8217;est un bug [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Compiler du Fortran sous Windows :</p>
<p>Situation :<br />
-<strong> Windows XP 32-bit</strong><br />
&#8211; 2 versions MATLAB <strong>R2011b et R2012b</strong></p>
<p> Pour faire simple , sans le support technique de MathWorks, il est impossible de compiler par exemple l&rsquo;exemple <strong>timestwo.F</strong>  ([matlabroot &lsquo;\extern\examples\refbook\timestwo.F&rsquo;]). Donc un grand merci au gars qui m&rsquo;a aidé!! &#8230; entre nous c&rsquo;est un bug MATLAB qui est à la cause de tout ça <img src="https://blog.developpez.com/matlab4geek/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /></p>
<p>Prérequis :<br />
Avoir le compilateur Fortran qui va bien en R2011b et R2012b:<br />
<strong>Intel Visual Fortran Composer XE 2011 </strong><br />
<a href="http://blog.developpez.com/matlab4geek/files/2012/10/intel.png"><img src="http://blog.developpez.com/matlab4geek/files/2012/10/intel.png" alt="" width="680" height="486" class="alignnone size-full wp-image-422" /></a></p>
<p>Information qu&rsquo;on retrouve sur le site du support :<br />
<a href="http://www.mathworks.fr/support/compilers/R2012b/win32.html#matlab" target="_blank">compilateur 12b supporté</a><br />
<a href="http://www.mathworks.fr/support/compilers/R2011b/win32.html#matlab" target="_blank">compilateur 11b supporté</a></p>
<p>La bonne nouvelle financière  c&rsquo;est qu&rsquo;avoir <strong>Microsoft Windows SDK 7.1</strong> est suffisant .<br />
Une fois la trial téléchargée sur le site d&rsquo;Intel , on peut commencer à mexer.</p>
<p><span id="more-419"></span></p>
<p>Voilà ce qui arrive en faisant un mex -setup:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mex -setup</div></div>
<blockquote><p>
Welcome to mex -setup.  This utility will help you set up<br />
a default compiler.  For a list of supported compilers, see  </p>
<p>http://www.mathworks.com/support/compilers/R2012b/win32.html</p>
<p>Please choose your compiler for building MEX-files:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Would you like mex to locate installed compilers [y]/n? y</div></div>
<p>Select a compiler:<br />
[1] Lcc-win32 C 2.4.1 in F:\R2012b\sys\lcc<br />
[2] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files\Microsoft Visual Studio 10.0<br />
[3] Microsoft Visual C++ 2005 SP1 in C:\Program Files\Microsoft Visual Studio 8 </p>
<p>[0] None </p></blockquote>
<p>votre <strong>compilateur Intel n&rsquo;apparait pas</strong> &#8230;</p>
<p>Donc vous recommencez et cette fois ci à la question <em>Would you like mex to locate installed compilers [y]/n? </em>, vous répondez non .</p>
<p>A ce moment là apparait la liste des compilateurs supportés en R2012b:</p>
<blockquote><p>Select a compiler:<br />
[1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)<br />
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)<br />
[3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)<br />
[4] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)<br />
[5] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)<br />
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)<br />
[7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)<br />
[8] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)<br />
[9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)<br />
[10] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)<br />
[11] Lcc-win32 C 2.4.1<br />
[12] Microsoft Software Development Kit (SDK) 7.1<br />
[13] Microsoft Visual C++ 2005 SP1<br />
[14] Microsoft Visual C++ 2008 SP1<br />
[15] Microsoft Visual C++ 2010<br />
[16] Open WATCOM C++ </p>
<p>[0] None </p></blockquote>
<p>Vous choisissez donc le 5 :</p>
<blockquote>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Compiler: 5</div></div>
<p>Warning: The default location for Intel Visual Fortran compiler is:<br />
         &laquo;&nbsp;C:\Program Files (x86)\Intel\ComposerXE-2011&Prime;<br />
         but either that directory does not exist or the configuration<br />
         is invalid.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Use C:\Program Files (x86)\Intel\ComposerXE-2011 anyway [y]/n? y</div></div>
<p>Please verify your choices: </p>
<p>Compiler: Intel Visual Fortran 12<br />
Location: C:\Program Files (x86)\Intel\ComposerXE-2011</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Are these correct [y]/n? y</div></div>
<p>Trying to update options file: D:\Documents and Settings\quefaurs\Application Data\MathWorks\MATLAB\R2012b\mexopts.bat<br />
From template:              F:\R2012b\bin\win32\mexopts\intelf12mssdk71opts.bat </p>
<p>Done . . . </p></blockquote>
<p>Donc déjà j’aurais du le sentir que ça n&rsquo;allait pas marcher vu le warning  précédent:</p>
<blockquote><p>Warning: The default location for Intel Visual Fortran compiler is:<br />
         &laquo;&nbsp;C:\Program Files (x86)\Intel\ComposerXE-2011&Prime;<br />
         but either that directory does not exist or the configuration<br />
         is invalid.
</p></blockquote>
<p>Et en effet mex timestwo.F me sort :</p>
<blockquote><p><strong>Could not find the compiler &laquo;&nbsp;ifort&nbsp;&raquo; on the DOS path</strong></p></blockquote>
<p><!--more--></p>
<p>Donc on recommence les étapes précédentes et cette fois ci à la question:<br />
Use C:\Program Files (x86)\Intel\ComposerXE-2011 anyway [y]/n?<br />
on répond non et <strong>on met le chemin exact où ma variable d&rsquo;environnement PATH me l&rsquo;indique</strong>  c&rsquo;est à dire:<br />
<strong>C:\Program Files\Intel\Composer XE 2011 SP1</strong></p>
<p>Cette fois ci je compile avec succès du Fortran. En revanche à chaque fois que je redémarre la 12b , je dois me retaper toutes les étapes précédentes <img src="https://blog.developpez.com/matlab4geek/wp-includes/images/smilies/icon_sad.gif" alt=":(" class="wp-smiley" /> . Donc pour que MATLAB comprenne que vous avez bel et bien un compilateur Fortran installé il faut demander à MathWorks le fichier <strong>intelf12mssdk71opts.stp </strong>.  En voici un extrait : </p>
<blockquote><p>
    #===================================================================<br />
    # intelf12mssdk71opts: Define where the Intel Visual Fortran 12.0<br />
    # compiler is installed.  Also sets language, version, and<br />
    # environment variables.<br />
    #===================================================================
</p></blockquote>
<p>Ensuite il faut copier ce fichier dans $MATLAB\bin\win32\mexopts\ (ce qui revient à écraser l&rsquo;existant)</p>
<p>Cette fois-ci des que vous taperez mex -setup, le compilateur Fortran apparaitra:</p>
<blockquote><p>
Would you like mex to locate installed compilers [y]/n? y</p>
<p>Select a compiler:<br />
<strong>[1] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker) in C:\Program Files\Intel\Composer XE 2011 SP1\</strong><br />
[2] Lcc-win32 C 2.4.1 in F:\R2012b\sys\lcc<br />
[3] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files\Microsoft Visual Studio 10.0<br />
[4] Microsoft Visual C++ 2005 SP1 in C:\Program Files\Microsoft Visual Studio 8 </p>
<p>[0] None </p>
<p>Compiler: </p></blockquote>
<p> Gagné!</p>
<p><!--more--></p>
<p>Pour que ça puisse marcher aussi en R2011b, il vous faudra copier  les 2 fichiers intelf12mssdk71opts.bat et intelf12mssdk71opts.scp de la R2012b dans le répertoire 11b équivalent :  $MATLAB\bin\win32\mexopts\ </p>
<p>Là franchement il faut avouer que compiler du Fortran n&rsquo;est pas trivial du tout quand l&rsquo;installation à la base est erronée. Enfin bon avec tout ça  maintenant plus de problème.</p>
<p>Liens utiles:<br />
<a href="http://www.mathworks.com/support/bugreports/776933" target="_blank">Why can&rsquo;t I use Intel Fortran Composer XE 2011 compiler with Microsoft Software Development Kit 7.1 linker for MEX-files in R2011b?</a> bug report qui devrait être remis à jour suite à mon Service Request .</p>
<p><a href="https://registrationcenter.intel.com/RegCenter/EvalForm.aspx?ProductID=1830" target="_blank">Télécharger le compilateur Fortran Studio XE 2013 pour Windows</a></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Une seule bar couleur</title>
		<link>https://blog.developpez.com/matlab4geek/?p=362</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=362#comments</comments>
		<pubDate>Thu, 27 Sep 2012 09:43:24 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[bar]]></category>
		<category><![CDATA[barh]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[facevertexcdata]]></category>
		<category><![CDATA[hist]]></category>
		<category><![CDATA[histc]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/matlab4geek/?p=362</guid>
		<description><![CDATA[Comment colorier une seule barre ? C&#8217;est assez tricky croyez moi et plusieurs solutions existent sur le site de TMW : How do I change the color in each bar of a plot in MATLAB? How do I define colors for individual bars on my bar graph according to their values in MATLAB 7.1 (R14SP3) [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.developpez.com/matlab4geek/files/2012/09/bar.png"><img src="http://blog.developpez.com/matlab4geek/files/2012/09/bar.png" alt="" width="1201" height="901" class="alignnone size-full wp-image-363" /></a></p>
<p>Comment colorier une seule barre ?</p>
<p><span id="more-362"></span></p>
<p>C&rsquo;est assez tricky croyez moi et plusieurs solutions existent sur le site de TMW :</p>
<p><a href="http://www.mathworks.fr/support/solutions/en/data/1-17DC8/index.html?solution=1-17DC8" target="_blank">How do I change the color in each bar of a plot in MATLAB? </a><br />
<a href="http://www.mathworks.fr/support/solutions/en/data/1-1T6UHS/index.html?solution=1-1T6UHS" target="_blank">How do I define colors for individual bars on my bar graph according to their values in MATLAB 7.1 (R14SP3) ? </a><br />
<a href="http://www.mathworks.fr/support/solutions/en/data/1-4LDEEP/index.html?solution=1-4LDEEP" target="_blank">How do I change the color of each bar in a plot if I do not have bar groups in MATLAB 7.6 (R2008a) ?</a> </p>
<p>voilà moi comment je fais, ma solution est simple je trouve et utilise <strong>facevertexcdata</strong> :</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%% Create n bars<br />
n = 10;<br />
mydata= 1 :n;<br />
&nbsp;<br />
%% get the children<br />
bar_h=bar(mydata);<br />
bar_child=get(bar_h,'Children')<br />
&nbsp;<br />
%% par defaut les barres sont bleues moi je les mets à violet pour le fun<br />
violet = [0.514 0.38 0.482]<br />
couleurs = repmat(violet ,n,1)<br />
couleurs &nbsp;(6,:) =[1 0 0] % et la sixieme bar je la mets en rouge !<br />
&nbsp;<br />
set(bar_child, 'facevertexcdata',couleurs)</div></div>
<p>voilà j&rsquo;espère que ça vous servira !</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Occurences dans un vecteur (suite)</title>
		<link>https://blog.developpez.com/matlab4geek/?p=164</link>
		<comments>https://blog.developpez.com/matlab4geek/?p=164#comments</comments>
		<pubDate>Thu, 19 Jul 2012 08:58:30 +0000</pubDate>
		<dc:creator><![CDATA[tug83]]></dc:creator>
				<category><![CDATA[Best-of des commandes MATLAB utiles]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[arrayfun]]></category>
		<category><![CDATA[isequalwithequalnans]]></category>
		<category><![CDATA[NaN]]></category>
		<category><![CDATA[occurrences]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hier je vous montrais comment avec nnz calculer le nombre d’occurrences d&#8217;un nombre dans un vecteur: A = [1 2 33 4 33 33 5 33 6 7 8 9] La limitation de ce trick est lorsque le vecteur contient des NaN. Exemple : A = [1 2 33 4 33 33 5 33 6 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Hier je vous montrais comment avec nnz calculer le nombre d’occurrences d&rsquo;un nombre dans un vecteur:<br />
<code class="codecolorer text default"><span class="text">A = [1 2 33 4 33 33 5 33 6 7 8 9]</span></code></p>
<p>La limitation de ce trick est lorsque le vecteur contient des NaN.</p>
<p>Exemple :</p>
<p><code class="codecolorer text default"><span class="text">A = [1 2 33 4 33 33 5 33 6 7 8 9 NaN NaN]</span></code></p>
<p>en effet<br />
nnz(A==NaN)<br />
<strong>retourne zéro</strong> &#8230;</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
