Date: May 6, 2013 2:40 PM
Author: Bruno Luong
Subject: Re: Random Matrix help

"Steven_Lord" <slord@mathworks.com> wrote in message <km8qs6$4jt$1@newscl01ah.mathworks.com>...

> % The odds of that happening are so small I'm going to neglect this step for
> the example


I propose to remove the chance of oddity entirely, and furthermore gaining some speed by using RAND rather than RANDN.

n = 5;
A = triu(2*round(rand(n))-1,1);
A = A + A'

% Bruno