create a squence with the repetition interval follow pre-specified distribution
1 view (last 30 days)
Show older comments
could you guys help with the following question.
suppose i wanna create a sequence of 120 with 40 element (each repeated three time), but the repetition interval need to following given distribution ={1 2 3 4}*10.
A=[1:50]% elements
rep1_dist=kron(ones(10,1),[1:4]);% rep1 distribution
rep2_dist=kron(ones(10,1),[1:4]); % rep2 distribution
the only constraint here is that the interval for the first repetition should not be the same as the second repetition interval. for example, 1 2 1 3 1 is not good (as both repetition intervals for 1 is 2), but 1 2 1 2 3 1 is good.
how can i do the rest?
thanks!
1 Comment
Jan
on 18 Dec 2012
The question is not clear. How is "A=1:50" (omit the square brackets) connected to "sequence of 120 with 40 element", and how does this satisfy "distribution ={1 2 3 4}*10", and what does the latter mean? What are "repetition intervals"?
What have you tried so far and which problems have occurred?
Answers (0)
See Also
Categories
Find more on Particle & Nuclear Physics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!