For Programmers: Free Programming Magazines  


Home > Archive > Matlab > November 2005 > Re: Matlab Special Random Number Generator









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Matlab Special Random Number Generator
dario

2005-11-30, 4:02 am

Yes, but amadridfan wants #number of (1) ==#number of (-1)
>But the problem is: In the rand function, more than half of the numbers are less (or
>greater) than 0.5. So the subroutine I just wrote above fails spectacularly. Can anyone
>help me? Here's the problem again: I need to generate an array (via a


>function/subroutine) >that has half it's elements as 1, and the other half as -1.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com