Finding Pattern in Array of Values 1-64

조회 수: 11 (최근 30일)
William Collants
William Collants 2020년 6월 20일
댓글: Adam Danz 2020년 6월 20일
Hello World,
so I've this 1-D Array of about 100k Elements, Ranging in Value from 1 to 64. Plotting various Sections of the Array, the Order of Values does not seem to follow any discernable pattern, but I'd like to know that for sure. Plotting a histogram of the Array, for one, shows a highly non-uniform distribution of Values. Some, it looks like, do not occur at all.
What's the smartest way to go about this, to detect, if there be one, an underlying recursiveness, regularity, pattern, or function, according to which the numbers are arranged, or determine with certainty the absence of any regularity or pattern?
Kind Regards,
Tim
  댓글 수: 3
Star Strider
Star Strider 2020년 6월 20일
I would experiment with xcorr, xcov, and their friends (such as findsignal) to see what they reveal:
x = zeros(1,100)+0.1;
x(20:28) = [1:5 4:-1:1];
x(60:68) = -[1:5 4:-1:1];
[r,lags] = xcov(x);
figure
subplot(2,1,1)
plot(x)
grid
subplot(2,1,2)
plot(lags, r)
grid
Here, the two are 40 index units apart, and of opposite signs, and that shows on the plot.
Adam Danz
Adam Danz 2020년 6월 20일
I was thinking along the lines of Star Strider's comment, too. You'd need to test many different window sizes but you may have a good estimate of the best window size by looking at the plotted raw data.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by