标题:m文件运行时出现Empty state-space model.该如何处理?
取消只看楼主
lishiay
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-4-16
 问题点数:0 回复次数:0 
m文件运行时出现Empty state-space model.该如何处理?

%function p = ss_Pe94(snr_in_dB,Lc,A,w0)
echo on
snr_in_dB=0:5:30;
Lc=20;
A=4;
w0=1;
snr=10^(snr_in_dB/10);
sgma=1;
Eb=2*sgma^2*snr;
E_chip=Eb/Lc;
num_of_err=0;
N=10000;
for i=1;N,
temp=rand;
if(temp<0.5),
data=-1;
else
data=1;
end;
%将其重复Lc次
for j=1:Lc,
repeated_data(j)=data;
end;
for j=1:Lc,
temp=rand;
if(temp<0.5),
pn_seq(j)=-1;
else
pn_seq(j)=1;
end;
end;

%发送信号为
trans_sig=sqrt(E_chip)*repeated_data.*pn_seq;
%方差为sgma^2的高斯白噪声
noise=sgma*randn(1,Lc);
%干扰
n=(i-1)*Lc+1:i*Lc;
interference=A*sin(w0*n);
%接收信号
rec_sig=trans_sig+noise+interference;
%从接收信号中产生判决变量
temp=rec_sig.*pn_seq;
decision_variable=sum(temp);
if(decision_variable<0),
decision=-1;
else
decision=1;
end;
if(decision~=data),
num_of_err=num_of_err+1;
end;
end;
p=num_of_err/N;


运行时出现 Empty state-space model.

是因为程序有问题吗 ?

搜索更多相关主题的帖子: snr model Empty temp data 
2007-04-19 11:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-133087-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.322091 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved