Prev: Problem loading a dat file
Next: dll files from MATLAB
From: Kishore on 4 Nov 2009 21:45 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!.
From: Stefano on 5 Nov 2009 01:42 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(a)yahoo.co.in> wrote in message <hcte7v$i42$1(a)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!.
From: Kishore on 5 Nov 2009 09:42 Thank you!
|
Pages: 1 Prev: Problem loading a dat file Next: dll files from MATLAB |