Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.8K Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Range of values except x

Posted 11 years ago

Hi everyone.

So, I'm new to Mathematica so this is probably very straightforward but I just can't do it. What I'm trying to do is to create a table of probabilities but without a specific undefined value to use with the command RandomChoice to select a range of numbers. For instance:

z = RandomChoice[
 Flatten[Table[{y/100}, {y, 
     50}]] -> Range[1, 50], 1]

So far so good. But now, I want out of choices the number 45. In order to do this, I also need to remove the scenario where y=45, right? I can do this, but I don't what to specify the value that is going to be taken out. Also, this is in the function "Do" since I'm running a simulation. Therefore, the process needs to start all over again, with z acquiring new values. Anyone knows how to do this?

Thanks!

POSTED BY: Goncalo Faria
Posted 11 years ago
POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard