Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Spreadspectrum matlab code
1. clc;
close all;
clear all;
b=input('Enter The input Bits');
pnseq=input('enter pn 7 bit sequence');
%ln=length(b);
% Converting bit 0 to -1
for i=1:length(b)
if b(i)==0
b(i)=-1
end
end
% Generating the bit sequence with each bit 8 samples long
k=1
bb=0
for i=1:length(b)
for j=1:7
bb(k)=b(i);
j=j+1;
k=k+1;
end
i=i+1;
end
pnseq1=[]
for i=1:length(b)
pnseq1=[pnseq1 pnseq]
end
%len=length(bb);
for i=1:length(pnseq1)
if pnseq1(i)==0
pnseq1(i)=-1;
end
end
for i=1:length(bb)
bbs(i)=bb(i).*pnseq1(i);
end
dsss=[];
t=0:0.1:2*pi;
c1=sin(t);
c2=sin(t+pi);
for k=1:length(bb)
if bbs(1,k)==-1
dsss=[dsss c2];
else
dsss=[dsss c1];
end
end
subplot(4,1,1);
stairs(bb);
axis([0 length(bb) -2 2]);