云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 2ASK数字信号频带传输系统的设计与建模

2ASK数字信号频带传输系统的设计与建模

  • 62 次阅读
  • 3 次下载
  • 2025/6/25 11:14:35

noisycode(i,j) = 0; else

noisycode(i,j) = 1; end end end

newmsg = decode(noisycode,n,k,'cyclic'); nar=xor(msg,newmsg); e=sum(sum(nar));

errorCount=errorCount+e; %error count testCount=testCount+200; if(testCount

tempBER=errorCount/testCount;

%test if the test length is large enough if(tempBER>0)

thresholdTestLength=100/(tempBER); else

thresholdTestLength=maxTestLength; end

%Stop current EbN0 test when the test threshold is reached if(testCount>=thresholdTestLength)

myTestLength(index)=testCount; myBER(index)=tempBER myEbN0(index)=EbN0 index=index+1; break; end end end

%Draw curves for the results semilogy(myEbN0,myBER,'+-'); xlabel('Eb/N0 in dB'); ylabel('bit error rate'); hold on %Th. results

EbN0_R=10.^(myEbN0/10); ?/N0 in ratio thBER=0.5*erfc(sqrt(EbN0_R)); semilogy(myEbN0,thBER,'*-');

legend('simulation results','theoretic results'); grid

5.1 信号源模型

通过调用自定义函数randint实现,例如randint(1,10)可生成一个1行10列的随机二进制序列, 源代码如下:

function out = randint(varargin);

for i=1:nargin if(i>1)

sigStr(size(sigStr,2)+1) = '/'; end;

if(isnumeric(varargin{i})) sigStr(size(sigStr,2)+1) = 'n'; else

error('Only numeric arguments are accepted.'); end; end; case 'n' m

= varargin{1};

case 'n/n'

= varargin{1}; = varargin{2};

m n

case 'n/n/n'

= varargin{1};

m

n = varargin{2}; range = varargin{3};

case 'n/n/n/n'

= varargin{1}; = varargin{2};

m n

range = varargin{3}; state = varargin{4};

error('Syntax error.'); end;

if isempty(m) m = 1; end

if isempty(n) n = m; end

if isempty(range) range = [0, 1]; end

len_range = size(range,1) * size(range,2); if (~isfinite(m)) | (~isfinite(n))

error('Matrix dimensions must be finite.');

elseif (floor(m) ~= m) | (floor(n) ~= n) | (~isreal(m)) | (~isreal(n)) error('Matrix dimensions must be real integers.'); elseif (m < 0) | (n < 0)

error('Matrix dimensions must be positive.'); elseif (length(m) > 1) | (length(n) > 1) error('Matrix dimensions must be scalars.'); elseif len_range > 2

error('The RANGE parameter should contain no more than two elements.'); elseif max(max(floor(range) ~= range)) | (~isreal(range)) | (~isfinite(range)) error('The RANGE parameter must only contain real finite integers.');

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

noisycode(i,j) = 0; else noisycode(i,j) = 1; end end end newmsg = decode(noisycode,n,k,'cyclic'); nar=xor(msg,newmsg); e=sum(sum(nar)); errorCount=errorCount+e; %error count testCount=testCount+200; if(testCount

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com