ECE 161A Homework 2
Homework 2
项目类别:计算机

Problems from text 4.23, 4.24, 4.30 (Do not turn in, just to help with the review)

Matlab problem (Need to turn in):

In this assignment, we will examine the sampling of a continuous-time sinusoidal signal xc(t) at various sampling rates. Since Matlab cannot strictly generate a continuous-time signal, you will generate a sequence {xn(nTH)} from xc(t) by sampling it at a very high rate TH such that the samples are very close to each other. A plot of xc(nTH) using the ”plot” command will then look like a continuous-time signal.

1. You can use a segment of code like the one that appears below to generate the ”continuous” signal for plotting:

t = 0 : 0.005 : 10;

f = 6.5;

xc = cos(2 ∗ π ∗ f ∗ t);

What is the frequency of the sinusoid (in Hz)? What we are doing here is actually sampling the sinusoid at a rate of 200Hz. Since this is much, much higher than the frequency of our sinusoid, the result will look like a continuous signal when plotted with the ”plot” command. You can use a statement like the one below to generate a version of the sinusoid sampled with sampling period T:

n = 0 : T : 10;

xs = cos(2 ∗ π ∗ f ∗ n);

Use a sampling frequency of 10Hz to generate xs[n]. Use the ”subplot”, ”plot” and ”stem” commands to plot xc(t) and xs[n] on the same figure. Also, plot the frequency response of xc(t) and xs[n] using freqz (or fft and fftshift ) and specify the sinusoid frequency in terms of Hz or normalized frequency. Comment on your results.

2. Repeat the above step for four other sampling rates: 5Hz, 8Hz, 13Hz and 20Hz. Comment on your results. Feel free to changes the number of samples if that helps with obtaining better plots.

3. Using the original sampling frequency of 10Hz, repeat the first step with the sinusoids fre-quency set to 3.5Hz and then again at 13.5Hz. Is there any difference between the corre-sponding discrete-time signals and the one you generated in step 1? If not, why not?

留学ICU™️ 留学生辅助指导品牌
在线客服 7*24 全天为您提供咨询服务
咨询电话(全球): +86 17530857517
客服QQ:2405269519
微信咨询:zz-x2580
关于我们
微信订阅号
© 2012-2021 ABC网站 站点地图:Google Sitemap | 服务条款 | 隐私政策
提示:ABC网站所开展服务及提供的文稿基于客户所提供资料,客户可用于研究目的等方面,本机构不鼓励、不提倡任何学术欺诈行为。