Statistics
2 Questions
0 Answers
RANK
126,769
of 289,677
REPUTATION
0
CONTRIBUTIONS
2 Questions
0 Answers
ANSWER ACCEPTANCE
0.0%
VOTES RECEIVED
0
RANK
of 19,575
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 144,047
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
Question
How do I generate random numbers within a certain range a and b but excluding a specific number within this range, let's call this number c?
so for example the function has to be randint_reject(a,b,c) where it generates random numbers from a and b but excludes the val...
10 years ago | 0 answers | 0
0
answersQuestion
I want to write a function which takes as input three integers a, b and c, and generates and returns a random integer that is equally likely to take any value between a and b (inclusive), but will not return the value given by c.
This is what I have so far: function f = randnum_reject(a,b,c) randnum_reject = (b-a)*rand + a; f = rand...
10 years ago | 2 answers | 0