function lfsrplot(filename) Nskip = 8; M = csvread(filename); M = (M-mean(M))/(max(M) - mean(M)); t = abs(fftshift(fft(M))); plot(t); %plot(1:(length(t)+1)/Nskip,t(Nskip*(1:(length(t)+1)/Nskip)-1)); %tfoo = t - shift(t,1); %t2foo = find(tfoo<0); %tbar = t2foo - shift(t2foo,1); %t2bar = find(abs(tbar)<1.1); %t2range = 4*(1:(length(t2bar)+mod(length(t2bar),4))/4)-mod(length(t2bar),4); %plot(t2foo(t2bar(t2range)),t(t2foo(t2bar(t2range)))); %disp(length(t2bar)); endfunction