From: noveen on
Please let me know as to how i can go about generating random bits 1 and 0 at different data rates
From: Walter Roberson on
noveen wrote:
> Please let me know as to how i can go about generating random bits 1 and
> 0 at different data rates

Is this a simulink question? Or Instrument Control Toolbox question? Or
a serial port question? Or is this a simulated data rate? A Parallel
port strobe question?

Or when you speak of "data rates", are you hinting that you want to be
able to adjust the relative probabilities of 0 vs 1?

If it is a matter of adjusting relative probabilities, then if p is to
be the probability of the 0 bit,

rand() > p

will give you 0 with probability p and 1 with probability 1-p
From: us on
"noveen " <noveenkapur(a)yahoo.co.in> wrote in message <hs08qa$f1u$1(a)fred.mathworks.com>...
> Please let me know as to how i can go about generating random bits 1 and 0 at different data rates

what have YOU done so far to solve YOUR particular problem...

us
From: noveen on
Walter Roberson <roberson(a)hushmail.com> wrote in message <DZNEn.66$TL5.36(a)newsfe24.iad>...
> noveen wrote:
> > Please let me know as to how i can go about generating random bits 1 and
> > 0 at different data rates
>
> Is this a simulink question? Or Instrument Control Toolbox question? Or
> a serial port question? Or is this a simulated data rate? A Parallel
> port strobe question?
>
> Or when you speak of "data rates", are you hinting that you want to be
> able to adjust the relative probabilities of 0 vs 1?
>
> If it is a matter of adjusting relative probabilities, then if p is to
> be the probability of the 0 bit,
>
> rand() > p
>
> will give you 0 with probability p and 1 with probability 1-p
programs to generate variable bits is possible using matlab. I am interested in generating random bits at different data rates say between 9.6Kbps to 10Mbps
From: Walter Roberson on
noveen wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message
> <DZNEn.66$TL5.36(a)newsfe24.iad>...
>> noveen wrote:
>> > Please let me know as to how i can go about generating random bits 1
>> and > 0 at different data rates
>>
>> Is this a simulink question? Or Instrument Control Toolbox question?
>> Or a serial port question? Or is this a simulated data rate? A
>> Parallel port strobe question?
>>
>> Or when you speak of "data rates", are you hinting that you want to be
>> able to adjust the relative probabilities of 0 vs 1?
>>
>> If it is a matter of adjusting relative probabilities, then if p is to
>> be the probability of the 0 bit,
>>
>> rand() > p
>>
>> will give you 0 with probability p and 1 with probability 1-p
> programs to generate variable bits is possible using matlab. I am
> interested in generating random bits at different data rates say between
> 9.6Kbps to 10Mbps

tic
use rand() to generate all the bits needed for 1 seccond's worth of
transmission
pause(1=toc) to wait until the end of the second
start again

If that's not what you want, then you must have a model of (or actual
mechanism for) transmitting the bits that must be gone through, and the
nature of that model or mechanism might affect your generation.

As 9600 Kbps to 10 Mbps is a common range to be covered by a synchronous
transmission mechanism such as a T1 link, I wonder whether perhaps what
you are intending to ask for is some kind of mechanism for asserting
each bit for a time inversely proportional to your current transmission
rate? Or if you are asking for information on how to configure a serial
port for a given data rate? Even after your clarification, I cannot tell
what you really want.