Thread Subject: random source generator?

Subject: random source generator?

From: Kishore

Date: 5 Nov, 2009 02:45:20

Message: 1 of 3

Hello,
I need to generate n random symbols from the foloowing
I have 4 symbols a) (1,0) b) (-1,0) c) (0,3) d) (0,-3).

Which command do i need to use for this.

I used randsrc(), but how should the alphabet parameter be passed [1,0,-1,3,-3] will generate all possible combinations...But i need only the above a,b c and d symbols.


Thanks!.

Subject: random source generator?

From: Stefano

Date: 5 Nov, 2009 06:42:04

Message: 2 of 3

if the symbols can be complex:

randsrc(m,1,[1,-1,3i,-3i]);

or if they must be real vectors:

c=[1 0; -1 0; 0 3; 0 -3];
c(1+floor(4*rand(m,1)),:);


"Kishore " <kishore3385@yahoo.co.in> wrote in message <hcte7v$i42$1@fred.mathworks.com>...
> Hello,
> I need to generate n random symbols from the foloowing
> I have 4 symbols a) (1,0) b) (-1,0) c) (0,3) d) (0,-3).
>
> Which command do i need to use for this.
>
> I used randsrc(), but how should the alphabet parameter be passed [1,0,-1,3,-3] will generate all possible combinations...But i need only the above a,b c and d symbols.
>
>
> Thanks!.

Subject: random source generator?

From: Kishore

Date: 5 Nov, 2009 14:42:02

Message: 3 of 3

Thank you!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
symbol generation Kishore 4 Nov, 2009 21:49:02
random symbols Kishore 4 Nov, 2009 21:49:02
rssFeed for this Thread

Contact us at files@mathworks.com