代码搜索:S-V MATLAB
找到约 10,000 项符合「S-V MATLAB」的源代码
代码结果 10,000
www.eeworm.com/read/18028/771090
matlab
www.eeworm.com/read/18028/771091
matlab
function [output, state] = encode_bit(g, input, state)
[n,k] = size(g);
m = k-1;
for i=1:n
output(i) = g(i,1)*input;
for j = 2:k
output(i) = xor(output(i),g(i,j)*state(j-1));
end
www.eeworm.com/read/18028/771092
matlab
st1 = 27221; st2 = 4831; %定义随机数产生的状态
n = 7; k = 4; %汉明码的参数
msg = randint(k*500,1,2,st1); %信息序列
code = encode(msg,n,k,'hamming/binary'); %编码
%产生突发错误,使得相邻码字发生错误
errors = zeros(si
www.eeworm.com/read/18028/771093
matlab
snr=10;
N=input('number'); %数据长度
Es=3;
g=[1 0 1;0 0 1]; %卷积码编码器两路的冲激响应
x=round(rand(1,N)); %产生信源
for i=1:N/2; %串并变换
x1(i)=x(2*i-1);
x2(i)=x(2*i);
end;
z=cnvc(g,x1,x2); %进行(3,2,3)卷积码编码
www.eeworm.com/read/18028/771094
matlab
R = 2; %插值因子
hm = mfilt.cicinterp(R);
fs = 22.05e3; % 原始采样频率:22.05 kHz.
n = 0:5119; % 5120个采样点
x = sin(2*pi*1e3/fs*n); %原始信号
y_fi = filter(hm,
www.eeworm.com/read/18028/771095
matlab
function out = CICinterp(r,x);
Hm = mfilt.cicinterp(r); %使用默认的CIC阶数和差分时延,以及字长
x_real = real(x);
x_imag = imag(x);
out_real = filter(Hm,x_real); %实部和虚部分开滤波
out_imag = filter(Hm,x_imag);
outt
www.eeworm.com/read/18028/771096
matlab
function out = halfdec(n,fp,l,x)
b = firhalfband(n,fp,'dev'); %半带滤波器系数
hf = mfilt.firdecim(l,b); %利用半带滤波器设计一个多相抽取滤波器
x_real = real(x);
x_imag = imag(x);
out_real = filter(hf,x_real); %实部和虚部
www.eeworm.com/read/18028/771097
matlab
function out = halfinterp(n,fp,l,x)
b = firhalfband(n,fp,'dev');%firhalfband(n,fp); %半带滤波器系数
hf = mfilt.firinterp(l,b); %使用半带滤波器设计一个多相插值滤波器
x_real = real(x);
x_imag = imag(x);
out_real = fi
www.eeworm.com/read/18028/771098
matlab
fs = 22.05e3; % 原始采样频率:22.05 kHz.
n = 0:5119; % 5120个采样点
x = sin(2*pi*1e3/fs*n); %原始信号
b = firhalfband(16,0.0001,'dev');
impz(b);
h = mfilt.firdecim(2,b);
www.eeworm.com/read/18028/771099
matlab
function out = CICdec(decf, diffd, numsecs,x,iwl,owl,wlps)
Hd = mfilt.cicdecim(decf, diffd, numsecs,iwl,owl,wlps); %得到CIC抽取滤波器
Hd.FilterInternals ='SpecifyPrecision';
%改变滤波器中默认的字长数,长度为级数的两倍
Hd.Se