Current code: %%% N = 120; n = 0:N-1; x0 = [zeros(10,1);…

Question Current code: %%% N = 120; n = 0:N-1; x0 = [zeros(10,1);… Current code:%%%N = 120;n = 0:N-1;x0 = [zeros(10,1); ones(100,1); zeros(10,1)];x0 = x0/norm(x0);x1 = [zeros(10,1); ones(50,1); -ones(50,1); zeros(10,1)];x1 = x1/norm(x1);signals=[x0,x1];subplot(311)stem(n,x0,’b’,’Marker’,’none’,’LineWidth’,1)title(‘Signal x0 – Transmit to send a digital 0′,’fontsize’,18)subplot(312)stem(n,x1,’r’,’Marker’,’none’,’LineWidth’,1)title(‘Signal x1 – Transmit to send a digital 1′,’fontsize’,18)% received signal is either x0 or x1 with additive noisey = signals(:,round(rand(1,1))+1) + 0.2*randn(size(x1));y=y./norm(y); % normalize ysubplot(313)stem(n,y,’k’,’Marker’,’none’,’LineWidth’,1)title(‘Received signal – Was it a 0 or 1?’,’fontsize’,18)% computes the inner products between y and both x0 and x1:innerproduct0 = abs( y’ * x0 )innerproduct1 = abs( y’ * x1 )%%%%%%%% Write code below that stores a 0 or 1 into RECEIVEDBIT%%%% based upon whether x0 or x1 was the more likely transmission%%%% (hint: it should only take one or two lines of code)RECEIVEDBIT=? Modify the code to develop a set of sixteen signals of your creation (each signal will represent three bits of information). Be creative. Use the EdX code or the signals shown in class as a guide. o Each signal must be of length 256. o Each signal must be orthogonal to every other signal in the set o All individual values of the signal (unnormalized) must be either zero, one or negative one. o The Matlab script must contain commands that prove the signals are all orthogonal to each other ? You may use the dot() function to verify orthogonality between two signals o Modify the signals matrix to include all signals as columns o Create code that chooses one of the signals at random for transmission and adds a random amount of noise. ? The choice should be made with equal probability across the sixteen signals ? This new signal will be the received signal, RX o All signals should be normalized as shown in the example o Calculate the inner product (dot() function) between the received (RX) signal and each of the original signals. ? Create code that judges the value of each inner product and guesses which signal was transmitted. ? Create code that produces a confidence level when the difference between the largest and second largest inner product is greater than 0.2 (I.e., confidence level can be thought of as a binary indicator that is “high” or “low” confidence when deciding which signal was transmitted)  Math Statistics and Probability matlab EE 1201 Share QuestionEmailCopy link Comments (0)

Don't use plagiarized sources. Get Your Custom Assignment on
Current code: %%% N = 120; n = 0:N-1; x0 = [zeros(10,1);…
Just from $10/Page

Leave a Comment

Your email address will not be published. Required fields are marked *