1
0
This repository has been archived on 2024-09-17. You can view files and clone it, but cannot push or open issues or pull requests.
SDI-TransmissionProcesses/E_commbluetoothvoice_Matlab_2016b/commbluetoothvoice_init.m
github-classroom[bot] bb7f798573
Initial commit
2023-09-27 06:23:10 +00:00

42 lines
906 B
Matlab
Executable File

%COMMBLUETOOTHVOICE_INIT Initializes variables for Bluetooth Voice Transmission
% example (commbluetoothvoice.slx)
% Copyright 1996-2012 The MathWorks, Inc.
% Set input wave sample rate to be 8kHz
Input_Fs=8000;
sigin = audioread('commbluetoothvoice_input.wav');
% Coefficients for speech interpolation
[y,interp_coeffs]=interp(ones(1,10),8);
% Header Information
% Header_Info=[Slave_Address;Packet_Type;Flow_Control;ARQ;Sequence];
Slave_Address= [1 0 1]';
Packet_Type= [1 0 1 0]';
Flow_Control= [1];
ARQ=[1];
Sequence=[1];
Access_Code=zeros(72,1); Access_Code(1:2:72)=1;
% Initialize 1,0,1,0, sequence
One_Zero_Payload=zeros(240,1);
One_Zero_Payload(1:2:240)=1;
% Set Seeds
hop_seed=randseed(1);
awgn_channel_seed=randseed(2);
awgn_802_seed=randseed(3);
rate_802_seed=randseed(4);
data_seed=randseed(5);
% Hop frequency if fixed
fixed_hop_freq=20;
% Assign payload bits
Num_Payload_Bits=80;