<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 10/06/2016 à 16:19, Stéphane
Mottelet a écrit :<br>
</div>
<blockquote cite="mid:a7517b0a-aca1-febb-e129-e3eec3da8449@utc.fr"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Le 10/06/2016 à 15:59, Jens Simon
Strom a écrit :<br>
</div>
<blockquote cite="mid:575AC7C5.9070206@hslmg.de" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<span lang="EN-US"> rand(n,1)–rand(n,1)</span> is definitely
NOT uniform.</blockquote>
by convolution the density of such a variable seems triangle
shaped :<br>
<br>
f(x)=1/2-abs(x)/4, if x \in [-2,2]<br>
=0, elsewhere<br>
</blockquote>
oops, rather<br>
<br>
f(x)=1/2-abs(x)/2, if x \in [-1,1]<br>
<br>
sorry...<br>
<br>
S.<br>
<blockquote cite="mid:a7517b0a-aca1-febb-e129-e3eec3da8449@utc.fr"
type="cite"> <br>
<br>
S.<br>
<br>
<br>
<blockquote cite="mid:575AC7C5.9070206@hslmg.de" type="cite"> Jens<br>
------------------------------------------------------------------------------<br>
<div class="moz-cite-prefix">Am 10.06.2016 15:33, schrieb Samuel
Gougeon:<br>
</div>
<blockquote cite="mid:575AC1B6.40703@free.fr" type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=windows-1252">
<div class="moz-cite-prefix">Le 10/06/2016 15:21, Carrico,
Paul a écrit :<br>
</div>
<blockquote
cite="mid:3A6B7233274DB449A2A0053A47684F953F6B49C9@BGS-EX01.auxitrol.ad"
type="cite">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">In order to
simulate dimensional tolerances in +/-, I’m using the
following workaround : </span></p>
<p class="MsoNormal"><span lang="EN-US">n = 100;</span></p>
<p class="MsoNormal"><span lang="EN-US">a = rand(n,1) –
rand(n,1);</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Of course I need
to increase the N value to the domain … is there a
more “clever” way ? </span></p>
</div>
</blockquote>
grand(n,1,"unf",-1,1)<br>
<br>
BTW, i am not sure that <span lang="EN-US">
rand(n,1)–rand(n,1) builds (or keeps) a uniform
distribution over [-1, 1].<br>
<br>
Samuel<br>
<br>
</span> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Département de Génie Informatique
EA 4297 Transformations Intégrées de la Matière Renouvelable
Université de Technologie de Compiègne - CS 60319
60203 Compiègne cedex</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Département de Génie Informatique
EA 4297 Transformations Intégrées de la Matière Renouvelable
Université de Technologie de Compiègne - CS 60319
60203 Compiègne cedex</pre>
</body>
</html>