# Creating a custom list [closed]

This is the first list

lts1 = Table[i, {i, -1.8, 5.8, 0.1}]


1st question: In the interval between -1.8 and 5,8 how can I choose the step beforehand so as the list to contain 100 elements?

The second list

dist = MixtureDistribution[{1, 2}, {NormalDistribution[1, 1/2],
NormalDistribution[4, 5/3]}]
lst2 = RandomVariate[dist, 10^2]


We know that the second list contains 100 elements.

2st question: How can I join these two lists so the new list to be {{lst1[], lst2[]}, {lst1[], lst2[]}, ..., {lst1[], lst2[]}}?

• 32715 / 38009 + Transpose. – Kuba Jul 13 '15 at 14:30
• I am voting to close this question because it seems to me of limited general usefulness. The first part of your question is not quite about Mathematica, but rather about how generally to find divisions of an interval. For the second part of your question, instead, take a look at the "Transpose and dimensions" section at the beginning of the following answer: mathematica.stackexchange.com/a/259/27951. – MarcoB Jul 13 '15 at 14:30

For (1) try step = (b-a)/(n-1), in your case

step = (5.8 - -1.8)/99;
lts1 = Table[i, {i, -1.8, 5.8, step}];
Length @ lts1

(* 100 *)


For (2) you just need

Transpose[{lts1,lst2}]