標題:
msk調制與解調Matlab源碼
[打印本頁]
作者:
sharry
時間:
2018-1-20 15:14
標題:
msk調制與解調Matlab源碼
msk調制與解調
0.png
(46.46 KB, 下載次數(shù): 84)
下載附件
2018-1-20 20:05 上傳
Matlab源程序如下:
function [bit_stream ] =msk_demod( signal_ip,frequency,Tb)
%msk_demod program for minimum shift keying demodulation
% % Detailed explanation goes here
% clc;clear all;close all;
% s1=0;s2=0;s3=0;s4=0;
d1=0;d2=0;d3=0;d4=0;
d11=0;d22=0;d33=0;d44=0;
bit_odd=0;bit_even=0;
% data=[1 0 0 1 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1 1 1]
% data=[1 0 0 1 1 1 0 0]
% Tb=0.1;
% signal_ip=msk_mod(data,7,Tb,1);
%
% frequency=7;
s1=msk_mod([0 0],frequency,Tb,1);
s2=msk_mod([0 1],frequency,Tb,1);
s3=msk_mod([1 0],frequency,Tb,1);
s4=msk_mod([1 1],frequency,Tb,1);
l=length(signal_ip);
n_samp=l/1000;
loop=0;ind=1;
for i=1:n_samp
samp=signal_ip(1,loop+1:loop+1000);
d1=samp.*s1;
d2=samp.*s2;
d3=samp.*s3;
d4=samp.*s4;
d11=0;d22=0;d33=0;d44=0;
for k=1:1000
if (d1(1,k)>0.0000000001)
d11=d11+1;
end
if (d2(1,k)>0.0000000001)
d22=d22+1;
end
if (d3(1,k)>0.0000000001)
d33=d33+1;
end
if (d4(1,k)>0.0000000001)
d44=d44+1;
end
end
if (d11 > d22) && (d11 > d33) &&(d11 > d44)
bit_odd=0;
bit_even=0;
end
if (d22 > d11) && (d22 > d33) &&(d22 > d44)
bit_odd=0;
bit_even=1;
end
if (d33 > d22) && (d33 > d11) &&(d33 > d44)
bit_odd=1;
bit_even=0;
end
if (d44 > d22) && (d44 > d33) &&(d44 > d11)
bit_odd=1;
bit_even=1;
……………………
…………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼
所有資料51hei提供下載:
msk.zip
(2.92 KB, 下載次數(shù): 25)
2018-1-20 15:14 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
作者:
zjc123321
時間:
2019-4-29 10:51
我下載來看看
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1