From 86a5ae6596da34d5a44ccd8d362ed6e910d880df Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Mon, 4 Jun 2018 14:06:14 -0500 Subject: [PATCH] costasxcorr is a Gnu Octave script that calculates the cross correlation between Costas arrays. --- lib/fsk4hf/costasxcorr.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/fsk4hf/costasxcorr.m diff --git a/lib/fsk4hf/costasxcorr.m b/lib/fsk4hf/costasxcorr.m new file mode 100644 index 000000000..7d104c25d --- /dev/null +++ b/lib/fsk4hf/costasxcorr.m @@ -0,0 +1,14 @@ +# Gnu Octave script to calculate +# cross correlation between 2 Costas arrays +costas1=[2,5,6,0,4,1,3]; +costas2=[3,1,4,0,6,5,2]; +array1=zeros(7,7); +array2=zeros(7,7); +for i=1:7 + array1(i,costas1(i)+1)=1; + array2(i,costas2(i)+1)=1; +endfor +xcorr2(array1,array1,"none") +xcorr2(array2,array2,"none") +xcorr2(array1,array2,"none") +