Finding Pattern in Array of Values 1-64

3 Ansichten (letzte 30 Tage)
William Collants
William Collants am 20 Jun. 2020
Kommentiert: Adam Danz am 20 Jun. 2020
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 Kommentare
Star Strider
Star Strider am 20 Jun. 2020
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 am 20 Jun. 2020
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by