www.gusucode.com > 关于蓝牙的很好的仿真程序(simulink加matlab)源码程序 > bluetooth_init.m
% Initialize variables for Bluetooth Model % Input wave sample rate must be 8kHz Input_Fs=8000; load code_data; % Coefficients for speech interpolation [y,interp_coeffs]=interp(ones(1,10),8); clear y; Packet_Types={'NULL';'POLL';'FHS';'DM1';... 'DH1';'HV1';'HV2';'HV3';'DV';'AUX1';... 'DM3';'DH3';'SCORT';'undefined';... 'DM5';'DH5'}; % 1,0,1,0, sequence One_Zero_Payload=zeros(240,1); One_Zero_Payload(1:2:240)=1; % 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; %Misc Num_Payload_Bits=80; % Initial noise variance %var=0; EsNo=18;