数字信号处理基础实验(Laboratory Exercise 1)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Laboratory Exercise1(2class hours) DISCRETE-TIME SIGNALS:TIME-DOMAIN REPRESENTATION Project1.1Unit impulse and unit step sequences

A copy of Program P1_1is given below.

%Program P1_1

%Generation of a Unit impulse Sequence

clf;

%Generate a vector from-10to20

n=-10:20;

%Generate the unit impulse sequence

delta=[zeros(1,10)1zeros(1,20)];

%Plot the unit impulse sequence

stem(n,delta);

xlabel('Time index n');ylabel('Amplitude');

title('Unit Impulse Sequence');

axis([-10200 1.2]);

Answers:

Q1.1The unit impulse sequenceδ[n]generated by running Program P1_1is shown below:

Q1.2The modified Program P1_1to generate a delayed unit sample sequenceδd[n]with a delay of11samples is given below along with the sequence generated by running this program.

%Program Q1.2

%Generation of a Unit impulse Sequence with a delay of11samples

clf;

n=-10:20;

delta=[zeros(1,21)1zeros(1,9)];

stem(n,delta);

xlabel('Time index n');ylabel('Amplitude');

title('Unit Impulse Sequence with a delay of11samples');

axis([-10200 1.2]);

Q1.3The modified Program P1_1to generate a unit step sequence u[n]is given below along with the sequence generated by running this program.

%Program Q1.3

%Generation of a unit step sequence

clf;

n=-10:20;

delta=[zeros(1,10),ones(1,21)];

stem(n,delta);

xlabel('Time index n');ylabel('Amplitude');

title('Unit Step Sequence');

axis([-10200 1.2]);

Q1.4The modified Program P1_1to generate a unit step sequence ud[n]with an advance of7 samples is given below along with the sequence generated by running this program.

%Program Q1.4

%Generation of a unit step sequence with an advance of7samples

clf;

n=-10:20;

delta=[zeros(1,17),ones(1,14)];

stem(n,delta);

xlabel('Time index n');ylabel('Amplitude');

title('Unit Step Sequence with an advance of7samples');

axis([-10200 1.2]);

Project1.2Exponential signals

A copy of Programs P1_2and P1_3are given below.

%Program P1_2

%Generation of a complex exponential sequence clf;

c=-(1/12)+(pi/6)*i;

K=2;

n=0:40;

x=K*exp(c*n);

subplot(2,1,1);

stem(n,real(x));

xlabel('Time index n');ylabel('Amplitude'); title('Real part');

subplot(2,1,2);

stem(n,imag(x));

xlabel('Time index n');ylabel('Amplitude'); title('Imaginary part');

%Program P1_3

%Generation of a real exponential sequence

clf;

n=0:35;a= 1.2;K=0.2;

x=K*a.^n;

stem(n,x);

xlabel('Time index n');ylabel('Amplitude');

Answers:

Q1.5The complex-valued exponential sequence generated by running Program P1_2is shown below:

Q1.6The purpose of the operator real is:Complex real part.确定一个复数或矩阵的实部;

The purpose of the operator imag is:Complex image part.确定一个复数或矩阵的虚部.

Q1.7The purpose of the command subplot is:Create axes in tiled positions.(将图形窗口分成多个矩形窗格来显示多个图形)

Q1.8The real-valued exponential sequence generated by running Program P1_3is shown below:

相关文档
最新文档