matlab 程序中%标注的地方一直报错%2FSK仿真程序clear all;fs=2000; dt=1/fs;f1=20;f2=120; a=round(rand(1,10)); g1=a;g2= a; g11=(ones(1,2000))*g1; g1a=g11(:)’;g21=(ones(1,2000))’*g2;g2a=g21(:);t=0:dt:10-dt;t1=length(t);fsk1 =g1a.*cos(2

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 11:59:36

matlab 程序中%标注的地方一直报错%2FSK仿真程序clear all;fs=2000; dt=1/fs;f1=20;f2=120; a=round(rand(1,10)); g1=a;g2= a; g11=(ones(1,2000))*g1; g1a=g11(:)’;g21=(ones(1,2000))’*g2;g2a=g21(:);t=0:dt:10-dt;t1=length(t);fsk1 =g1a.*cos(2
matlab 程序中%标注的地方一直报错
%2FSK仿真程序
clear all;
fs=2000;
dt=1/fs;
f1=20;
f2=120;
a=round(rand(1,10));
g1=a;
g2= a;
g11=(ones(1,2000))*g1;
g1a=g11(:)’;
g21=(ones(1,2000))’*g2;
g2a=g21(:);
t=0:dt:10-dt;
t1=length(t);
fsk1 =g1a.*cos(2*pi*f1.*t);%%%%%%%%%%%%%%%%%%%%%%%%%
fsk2 =g2a.*cos(2*pi*f2.*t);%%%%%%%%%%%%%%%%%%%%%%%%%
fsk=fsk1+fsk2; %产生的信号
no=0.0*randn;
sn=fsk+no;
subplot(311);plot(t,no);
subplot(312);plot(t,fsk);
title(‘信号’);ylabel(‘’信号幅度);
subplot(313);plot(t,sn);
title(‘叠加噪声后的信号’);ylabel(‘幅度A’);xlabel(‘时间t’);
figure(2);
b1=fir1(101,[10/80020/800]);
b2=fir1(101,[90/800110/800]);
H1=fiter(b1,1,sn);H2=fiter(b2,1,sn);
Subplot(211);plot(t,H1);
title(‘经过带通滤波器后f1的波形’);ylabel(‘幅度’);
subplot(212);plot(t,H2);
title(‘经过带通滤波器后f2的波形’);ylabel(‘幅度’);xlabel(‘t’);
sw1=H1.*H1;sw2=H2.*H2;
figure(3);
subplot(211);plot(t,sw1);
title(‘经过相乘器h1后的波形’);ylabel(‘幅度’);
subplot(212);plot(t,sw12);
title(‘经过相乘器h2后的波形’);ylabel(‘?幅度’);xlabel(‘t’);
bn=fir1(101,[2/80010/800]);
figure(4);
st1=filter(bn,1,sw1);st2=filter(bn,1,sw2);
subplot(211);plot(t,st1);
title(‘经过低通滤波器sw1后的波形’);ylabel(‘幅度’);
subplot(212);plot(t,st2);
title(‘经过低通滤波器sw2后的波形’);ylabel(‘幅度’);xlabel(‘t’);
%判决
for(i=1:length(t))
if(st1(i)>=st2(i))st(i)=0;
elsest(i)=st2(i);
end
end
figure(5)
subplot(211);plot(t,st);title(‘经过抽样判决器后的波形’);ylabel(‘幅度’);
subplot(212);plot(t,sn);title(‘原始的波形’);ylabel(‘幅度’);xlabel(‘t’);
%加入噪声后
no=0.3*dandn(1,t1);
sn=fsk+no;帮我改一下这个程序,因为不是很懂,所以没有办法调试,改过之后我再对照原来的错误程序看错在哪里.

matlab 程序中%标注的地方一直报错%2FSK仿真程序clear all;fs=2000; dt=1/fs;f1=20;f2=120; a=round(rand(1,10)); g1=a;g2= a; g11=(ones(1,2000))*g1; g1a=g11(:)’;g21=(ones(1,2000))’*g2;g2a=g21(:);t=0:dt:10-dt;t1=length(t);fsk1 =g1a.*cos(2
%2FSK仿真程序
clear all;
fs=2000;
dt=1/fs;
f1=20;
f2=120;
a=round(rand(1,10));
g1=a;
g2= a;
g11=(ones(1,2000))'*g1;
g1a=g11(:)';
g21=(ones(1,2000))'*g2;
g2a=g21(:)';
t=0:dt:10-dt;
t1=length(t);
fsk1 =g1a.*cos(2*pi*f1.*t);%%%%%%%%%%%%%%%%%%%%%%%%%
fsk2 =g2a.*cos(2*pi*f2.*t);%%%%%%%%%%%%%%%%%%%%%%%%%
fsk=fsk1+fsk2; %产生的信号
no=0.0*randn;
sn=fsk+no;
subplot(311);plot(t,no);
subplot(312);plot(t,fsk);
% title(‘信号’);ylabel(‘’信号幅度);
subplot(313);plot(t,sn);
% title(‘叠加噪声后的信号’);ylabel(‘幅度A’);xlabel(‘时间t’);
figure(2);
b1=fir1(101,[10/80020/800]);
b2=fir1(101,[90/800110/800]);
H1=filter(b1,1,sn);H2=filter(b2,1,sn);
subplot(211);plot(t,H1);
% title(‘经过带通滤波器后f1的波形’);ylabel(‘幅度’);
subplot(212);plot(t,H2);
% title(‘经过带通滤波器后f2的波形’);ylabel(‘幅度’);xlabel(‘t’);
sw1=H1.*H1;
sw2=H2.*H2;
figure(3);
subplot(211);plot(t,sw1);
% title(‘经过相乘器h1后的波形’);ylabel(‘幅度’);
subplot(212);plot(t,sw2);
% title(‘经过相乘器h2后的波形’);ylabel(‘?幅度’);xlabel(‘t’);
bn=fir1(101,[2/80010/800]);
figure(4);
st1=filter(bn,1,sw1);st2=filter(bn,1,sw2);
subplot(211);plot(t,st1);
% title(‘经过低通滤波器sw1后的波形’);ylabel(‘幅度’);
subplot(212);plot(t,st2);
% title(‘经过低通滤波器sw2后的波形’);ylabel(‘幅度’);xlabel(‘t’);
%判决
for(i=1:length(t))
if(st1(i)>=st2(i))st(i)=0;
else st(i)=st2(i);
end
end
figure(5)
subplot(211);plot(t,st);
% title(‘经过抽样判决器后的波形’);ylabel(‘幅度’);
subplot(212);plot(t,sn);
% title(‘原始的波形’);ylabel(‘幅度’);xlabel(‘t’);
%加入噪声后
no=0.3*randn(1,t1);
sn=fsk+no;
.你的错误真是多啊.

matlab 程序中%标注的地方一直报错%2FSK仿真程序clear all;fs=2000; dt=1/fs;f1=20;f2=120; a=round(rand(1,10)); g1=a;g2= a; g11=(ones(1,2000))*g1; g1a=g11(:)’;g21=(ones(1,2000))’*g2;g2a=g21(:);t=0:dt:10-dt;t1=length(t);fsk1 =g1a.*cos(2 MATLAB中画图函数,plot(x,f)语句为什么一直报错?f是x的函数,求大神指导, matlab中 xlabel只能在轴的中间标注,怎样才能在轴的任意位置标注呢在程序中直接编写的语句 matlab神经网络中INITP函数一直报错[W,b]=initp(X,T);就这句 一直错 Matlab中如何修改图形中标注文字的大小? Matlab中如何修改图形中标注文字的大小? 在matlab中实现正弦信号和门函数的卷积这是一段程序,但实现不了,在最后一句 g2=conv(y,g1);报错了.t=-40:0.01:40;g1=[(t>0)&(t 求下题的MATLAB程序 最小二乘法的matlab程序 求下式的Matlab程序 高斯列主元消元法的matlab程序 matlab递推公式的实现T(0)=1T(1)=xT(m+1)=2xT(m)-T(m-1)在matlab中怎么求出任意T(m)的表达式?一楼的程序我也试过的,出现报错DOUBLE cannot convert the input expression into a double array.If the input expression contains a s 关于matlab 仿真最近在做matlab 仿真 下了几组开源代码 但是没个执行时都会遇到类似于?Input argument is undefined.这样的报错 举个例子 程序如下function output_data=LT_decoder_BEC(input_data,LT_gener_matrix,deg matlab 关于画图标注的问题想请问各位大大:1.下图中的小圆圈标注的怎么画的(SNR=那里)?2.图中并不是把每个取值点都用圆圈和菱形标注了()比如有的地方明显有拐点却没有圆圈或菱形的 Matlab中如何修改图形中标注文字的大小?[转] simpson公式的matlab程序 kruskal算法的Matlab程序 surf算法的matlab程序,