[Scilab-users] create random values between [-1,1]
Arvid Rosén
arvid at softube.com
Fri Jun 10 15:30:52 CEST 2016
That will not generate an uniform distribution over the range.
This will be uniform:
n = 100;
a = 2*rand(n,1) - 1;
Cheers,
Arvid
On 10 Jun 2016, at 15:21, Carrico, Paul <paul.carrico at esterline.com<mailto:paul.carrico at esterline.com>> wrote:
Hi
In order to simulate dimensional tolerances in +/-, I’m using the following workaround :
n = 100;
a = rand(n,1) – rand(n,1);
Of course I need to increase the N value to the domain … is there a more “clever” way ?
Thanks
Paul
EXPORT CONTROL :
Cet email ne contient pas de données techniques
This email does not contain technical data
_______________________________________________
users mailing list
users at lists.scilab.org<mailto:users at lists.scilab.org>
http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160610/2644909d/attachment.htm>
More information about the users
mailing list