Restricting random matrices - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Restricting random matrices (/thread-932.html) Restricting random matrices - DrD - 03-18-2014 10:03 AM I would like to generate some random symmetric matrices. Specifically in Toeplitz form. Can the ranm, or randMat commands be configured in some way to restrict the generated matrices to specific forms? More generally, I'm looking for command description/help suggesting ways to control the output of the Prime's randomly generated matrices. Thanks! RE: Restricting random matrices - Tim Wessman - 03-18-2014 03:25 PM >control the output of the Prime's randomly generated matrices. I don't believe so in this release. I think to do topelitz you'd need a routine to do that yourself though. RE: Restricting random matrices - DrD - 03-18-2014 05:13 PM I happened to discover that (in CAS) one could restrict lower and upper bounds of the random output by using something like: randMat(3,3,x .. y), or ranm(3,3,x .. y), where x and y are integers. That hinted at other possibilities. Most of the things I tried did not succeed, however. So I am left to wonder what the real syntax is? RE: Restricting random matrices - cyrille de brĂ©bisson - 03-19-2014 07:00 AM Hello, randMat(3,2,'randnorm(0,1)') (for example) will generate a random 3*2 matrix that follows the normal distribution... These are CAS commands. cyrille RE: Restricting random matrices - parisse - 03-19-2014 08:32 AM The giac syntax for generating random matrices according to a probability distribution is randmatrix(nrows,ncols,distribution,optional_distributions_arguments) for example: randmatrix(5,5,binomial,10,.3) randmatrix(5,5,normald) randmatrix(5,5,normald,1,2) (mu=1, sigma=2) Some distributions available on giac are unfortunately not available on the Prime: exponentiald, studentd, fisherd, geometric, negbinomial, uniformd. RE: Restricting random matrices - DrD - 03-19-2014 09:27 AM Thank you for the command help. The command set description found at: http://www.hpcalc.org/prime/docs/ Doesn't quite say it all. I suppose someday someone much smarter than I, will put together an enhanced command reference. If only that time was near ... -Dale- RE: Restricting random matrices - Helge Gabert - 03-19-2014 05:29 PM One example of a Toeplitz matrix would be: MAKEMAT(J-I, n, n) or some variation thereof. Caution: This seems to only work in Home. For the general case, you'll have to create your vectors which you would like to propagate along the minor diagonals and write a short PPL program. RE: Restricting random matrices - DrD - 03-19-2014 08:08 PM (03-19-2014 05:29 PM)Helge Gabert Wrote:  One example of a Toeplitz matrix would be: MAKEMAT(J-I, n, n) or some variation thereof. Caution: This seems to only work in Home. For the general case, you'll have to create your vectors which you would like to propagate along the minor diagonals and write a short PPL program. Thanks for putting me onto these interesting results: With n>0, MAKEMAT(J-I,n,n) produces a symmetric matrix left leaning. MAKEMAT(J+I,n,n) produces a symmetric matrix right leaning. MAKEMAT(J==I,n,n) produces the identity matrix. MAKEMAT(J==I^-1,n,n) produces a symmetric matrix with 1's on the main diagonal, and +/- infinity otherwise. Other operators on J and I produce interesting results, as well. RE: Restricting random matrices - salvomic - 02-10-2015 10:30 AM (03-19-2014 08:32 AM)parisse Wrote:  ... Some distributions available on giac are unfortunately not available on the Prime: exponentiald, studentd, fisherd, geometric, negbinomial, uniformd. I wonder: is it a hardware limitation or a decision of programmers? Thank you for info. Salvo