MATLAB Answers

Making a Distribution from a range

8 views (last 30 days)
hamzah khan
hamzah khan on 4 Sep 2020
Commented: the cyclist on 5 Sep 2020
Hello,
I want to make a range of numbers such that these two vectors come in them.
Y =[0.95;0.96;1.88;1.88;1.85;1.85;1.75;1.75;1.65;1.58];
Y =[1;1;1.31;1.31;1.89;2;1.45;1.42;1.95;1.98];
It could be a normal range or binomial or logistic range of numbers. The range of Y is from
Y =[1;1;2;2;2;2;2;2;2;2]; % max Y
Y = [0.5;0.5;1.25;1.25;1.25;1.25;1.225;1.25;1.25;1.25] % min Y
Random number generator is not really helpful, because there is no prediction what number will come next..
ub =[1;1;2;2;2;2;2;2;2;2];
lb =[0.5;0.5;1.25;1.25;1.25;1.25;1.225;1.25;1.25;1.25]
Y = lb + (ub-lb).*rand(10,1)

  1 Comment

the cyclist
the cyclist on 5 Sep 2020
Your question is not very clear to me. You are referring to four different variables as Y:
  • the minimum value of Y (an input variable?)
  • the maximum value of Y (an input variable?)
  • the two output variables, both referred to as Y
This is very confusing to me.
Is the following correct?
  • You have an input vector of the minimum values. Call it Y_min.
  • You have an input vector of the maximum values. Call it Y_max.
  • You want to generate one (or more?) output vectors from these. Call one of those Y.
What you want the output to look like is stll very unclear. You say you don't want the vectors to be random. But you don't clearly describe what you do want them to be.
We need more information, to help you.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!