Question: clear all; close all; file = fopen ( ' TransmittedMessage . txt ' ) ; % Open the file ( should be in the same
clear all;
close all;
file fopenTransmittedMessagetxt; Open the file should be in the same folder
message freadfilechar; Read the text as a string from the file
fclosefile; Close the file
Converting the message into a bit stream
textdoubletemp decbinmessage; Convert each character into binary minus zero is used to convert it into double instead of logical
Each character is represented by bits
bitstream reshapetextdoubletemp.; Reshape it into an array is needed for proper ordering
BPSK Modulation
Fs ; Sampling freq
Tb e; Bit duration
fc ; Carrier freq
Eb ; Energy per bit
dt Fs; time step
N lengthbitstream; Number of bits to be transmitted
t :dt:NTb; Time vector
t t:lengtht; the last element is discarded to adjust the size of the time vector
Stream repelembitstream,Tbdt; Enlarge the bit stream to match the size of the time vector
StreamStream; Replacing s with NRZ Level Encoder This arrangement fits the definition of log likelihood ratio
StreamStream; Replacing s with NRZ Level Encoder This arrangement fits the definition of log likelihood ratio
ModulatedSignal sqrtEbTbcospifctStream; BPSK modulated signal to be transmitted
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
