套积分的不要管
clc;
close all
x=[ 1 0 0 1 1 0 1];
bp=0.1;
bit=[];
for n=1:1:length(x)
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:length(x)bp;
figure(1)
plot(t1,bit);
axis([ 0 bplength(x) -.5 1.5]);
ylabel(‘amplitude(volt)’);
xlabel(’ time(sec)’);
title(‘digital signal’);
A1=10;
A2=0;
br=1/bp;
f=br10;
t2=bp/99:bp/99:bp;
ss=length(t2);
m=[];
for (i=1:1:length(x))
if (x(i)==1)
y=A1sin(2pift2);
else
y=A2sin(2pift2);
end
m=[m y];
end
t3=bp/99:bp/99:bplength(x);
figure(2)
plot(t3,m);
xlabel(‘time(sec)’);
ylabel(‘amplitude(volt)’);
title(‘waveform for binary ASK modulation’);
mn=[];
for n=ss:ss:length(m)
t=bp/99:bp/99:bp;
y=sin(2pif*t);
mm=y.m((n-(ss-1)):n);
t4=bp/99:bp/99:bp;
z=trapz(t4,mm)
zz=round((2z/bp))
if(zz>7.5)
a=1;
else
a=0;
end
mn=[mn a];
end
bit=[];
for n=1:length(mn);
if mn(n)==1;
se=ones(1,100);
else mn(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t4=bp/100:bp/100:length(mn)bp;
figure(3)
plot(t4,bit);
axis([ 0 bplength(mn) -.5 1.5]);
ylabel(‘amplitude(volt)’);
xlabel(’ time(sec)’);
title(‘recived information as digital signal demodulation’);
相关文章
- 03-08Learning Data Science: Ask Great Questions 大数据教程之如何提问 Lynda课程中文字幕
- 03-08【NX二次开发】UF_OBJ_ask_display_properties获取对象所在层、获取对象颜色、获取对象是否是空白状态、获取对象是否高亮,获取对象线宽、字体大小
- 03-08NX二次开发-UFUN不用UI控件,鼠标选中对象获得tag UF_UI_ask_global_sel_object_list
- 03-08NX二次开发-UFUN获取工程图的数量和tag UF_DRAW_ask_drawings
- 03-08NX二次开发-UFUN tag转handle UF_TAG_ask_handle_of_tag
- 03-08NX二次开发-UFUN输入特征TAG,获取特征所有表达式TAG和个数UF_MODL_ask_exps_of_feature
- 03-08NX CAM二次开发-UF_SETUP_ask_mct_root获得机床(刀具)视图的根节点
- 03-08NX二次开发-UFUN体找边UF_MODL_ask_body_edges
- 03-08NX二次开发-UFUN获得边的类型UF_MODL_ask_edge_type
- 03-08NX二次开发-UFUN获得体的表面积,体积,重心等UF_MODL_ask_mass_props_3d