怎样把QPSK的有关仿真程序改为8PSK的仿真程序
我正在做毕业设计,要做MPSK——TCM的MATLAB仿真,现在手上有一个关于QPSK的程序,但不知道怎样修改为8PSK的,不知有那位高手可以帮我一下,谢谢了。[ 本帖最后由 eight 于 2007-5-31 20:18 编辑 ] 可不可以先把你的QPSK程序传过来给我看一下 把你的程序发到我邮箱里吧manlili522cl@163.com
感谢
bit_sequence=rand(1,N)>0.5;bpsk=bit_sequence*2-1;
temp=/sqrt(2);
transformbit = ;
qpsk_sequence = ones(1,N/2);
for k=1:N/2
transformbit = bit_sequence(2*k-1:2*k);
if transformbit==
qpsk_sequence(k) = temp(1);
end
if transformbit==
qpsk_sequence(k) = temp(2);
end
if transformbit==
qpsk_sequence(k) = temp(3);
end
if transformbit==
qpsk_sequence(k) = temp(4);
end
if transformbit==
qpsk_sequence(k) = temp(5);
end
if transformbit==
qpsk_sequence(k) = temp(6);
end
if transformbit==
qpsk_sequence(k) = temp(7);
end
if transformbit==
qpsk_sequence(k) = temp(8);
end
end
这是我改的程序,但仿真有问题,没有波形,请帮帮看一下
程序
N=24;bit_sequence=rand(1,N)>0.5;
temp= exp(j*2*pi.*()./8);
%transformbit = ;
psk8_sequence = ones(1,N/3);
for k=1:N/3
transformbit = bit_sequence(3*k-2:3*k);
if transformbit==
psk8_sequence(k) = temp(1);
end
if transformbit==
psk8_sequence(k) = temp(2);
end
if transformbit==
psk8_sequence(k) = temp(3);
end
if transformbit==
psk8_sequence(k) = temp(4);
end
if transformbit==
psk8_sequence(k) = temp(5);
end
if transformbit==
psk8_sequence(k) = temp(6);
end
if transformbit==
psk8_sequence(k) = temp(7);
end
if transformbit==
psk8_sequence(k) = temp(8);
end
end
页:
[1]