How can I generate controlled sequences in matlab?

조회 수: 2 (최근 30일)
chaturika Jayawardane
chaturika Jayawardane 2016년 3월 13일
편집: John D'Errico 2016년 3월 13일
For example I have numbers 1 to 8.
The 4 occurres more frequently after a 3. However this can be consecutive 3 4 or non consecutive 3 1 5 6 4. I have few more constraints concerning order as the example above. How can I generate sequences taking them to account.
Thanks
  댓글 수: 2
Ced
Ced 2016년 3월 13일
I don't think there is a general answer.
First, in the most general form, if your samples are not iid, i.e. if the distribution changes depending on what has been sampled before, you have to sample the elements sequentially.
Then, the next steps really depend on what you mean by "more frequently".
Let's assume you want a total of N samples. If you have two distributions A and B, i.e. one "before a 3 was sampled" and one "after a 3 was sampled", you could either:
a) Extract N samples from distribution A, look for the first "3", then resample all the following entries using distribution B.
b) Sample them sequentially, starting with distribution A, and after the first "3" has been extracted, change to using distribution B.
This can become arbitrarily complex depending on what the "occurs more frequently" really means, i.e. on how/when your distribution changes.
You might want to have a look at Markov Decision Processes.
John D'Errico
John D'Errico 2016년 3월 13일
편집: John D'Errico 2016년 3월 13일
You have not specified a clear description of the rules. Merely saying that some event happens more often than other events is not mathematics. It is just a rough suggestion. Then you say you have a few more constraints. Of course, what they are remains only in your mind.
You need to turn your rough guidelines into mathematical goals, or at least provide clear explanations that are sufficient.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by