Path: news.mathworks.com!not-for-mail
From: "Kirk" <kwythers.nospam@umn.edu>
Newsgroups: comp.soft-sys.matlab
Subject: coin flip
Date: Thu, 23 Feb 2012 15:29:28 +0000 (UTC)
Organization: University of Minnesota
Lines: 8
Message-ID: <ji5m0o$le3$1@newscl01ah.mathworks.com>
Reply-To: "Kirk" <kwythers.nospam@umn.edu>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1330010968 21955 172.30.248.48 (23 Feb 2012 15:29:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 23 Feb 2012 15:29:28 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1161409
Xref: news.mathworks.com comp.soft-sys.matlab:758715

I need a suggestion on how to randomly generate 2 values (0 or 1), that can be used in an algorithm to perform an "either / or" action.

As in:

If 0, do this,
If 1, do that.

I've been looking at random number control, but there must be a more simple approach.