早教吧 育儿知识 作业答案 考试题库 百科 知识分享

将下面的载波换成chirp信号要求0时为down-chirp1时为up-chirps=[01110101];\x05t=0:2*pi/99:2*pi;\x05m1=[];c1=[];b1=[];\x05forn=1:length(s)\x05ifs(n)==0;\x05m=ones(1,100);\x05c=sin(5*t);\x05b=zeros(1,100);\x05elses(n)==1;

题目详情
将下面的载波换成chirp信号 要求0时为down-chirp 1时为up-chirp
s=[0 1 1 1 0 1 0 1];
\x05t=0:2*pi/99:2*pi;
\x05m1=[];c1=[];b1=[];
\x05for n=1:length(s)
\x05 if s(n)==0 ;
\x05 m=ones(1,100);
\x05 c=sin(5*t);
\x05 b=zeros(1,100);
\x05 else s(n)==1;
\x05 m=ones(1,100);
\x05 c=sin(2*t);
\x05 b=ones(1,100);
\x05 end
\x05 m1=[m1 m];
\x05 c1=[c1 c];
\x05 b1=[b1,b];
\x05end
\x05f=c1.*m1;
\x05subplot(3,1,1);
\x05plot(b1)
\x05title ('原始信号');
axis([0 100*length(s) -0.1 1.1]);
\x05subplot(3,1,2);
\x05plot(c1)
\x05title ('载波信号c1');
\x05axis([0 100*length(s) -1.1 1.1]);
\x05subplot(3,1,3);
\x05plot (f);
\x05title ('fSK已调信号');
axis([0 100*length(s) -1.1 1.1]);
▼优质解答
答案和解析
clear all;
s=[0 1 1 1 0 1 0 1];
N=1000;\x05
% t=linspace(0,1,N);
ss0=1; ss1=1;
f0=15; f1=1;
m1=[];c1=[];b1=[];
for n=1:length(s)
if s(n)==0;
if (n+1