资源简介
CMI代码实现
上课老师要求编写,自己编写,通过老师检查的matlab代码
代码片段和文件信息
function [t_newu] = func_cmi_encode(tbitsbits_rate)
f_s =(length(t)-1)/(t(length(t)-t(1)):
u = zeros(size(t_new));
%初始化
if (bits(1)==1)
u(1:17)=1;
u(18:33)=1;
s=1;
end
if (bits(1)==0)
u(1:17)=-1;
u(18:33)=1;
s=-1;
end
for i=2:length(bits)
L1 = round((i-1)*f_s/bits_rate)+1;
L2 = round((i-0.5)*f_s/bits_rate);
L3 = round(i*f_s/bit_rate
评论
共有 条评论