第一范文网 - 专业文章范例文档资料分享平台

信号与系统实验教程(只有答案)

来源:用户分享 时间:2025/5/19 5:31:46 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

信号x(t)的波形图 信号y(t) = x(1.5t+3) 的波形图

Q1-8:给定一个离散时间信号x[n] = u[n] – u[n-8],仿照示例程序Program1_5,编写程序

Q1_8,产生x[n]的左移序列x1[n] = x[n+6]和右移序列x2[n] = x[n-6],并在同一个图形窗口的三个子图中分别绘制这三个序列的图形。

编写的程序Q1_8如下:

编写产生x(t)的函数文件xx.m

function y=xx(n) y=u(n)-u(n-8); clear,close all, n = -10:15;

x =xx(n); % Generate the original signal x(n)

x1 = xx(n+6); % Shift x(t) to the left by 2 second to get x1(n+6) x2 =xx(n-6); % Shift x(t) to the right by 2 second to get x2(n-6) subplot(311)

stem(n,x,'.') % Plot x(t) grid on,

title ('Original signal x(n)') subplot (312)

stem (n,x1,'.') % Plot x1(t) grid on,

title ('Left shifted version of x(n)') subplot (313)

stem (n,x2,'.') % Plot x2(t) grid on,

title ('Right shifted version of x(n)') xlabel ('Time t (sec)')

信号波形图

Q1-9:编写程序Q1_9,使之能够接受以键盘方式输入的定义在不同时间段的两个不同连

续时间信号并完成卷积运算,分别绘制这两个信号及其卷积的结果的图形,图形按照2?2分割成四个子图。

编写的程序Q1_9如下:

clear;close all; dt = 0.01;

t0=input('Input first signal t0:');t1=input('Input first first signal t1:'); tx = t0:dt:t1;

x = input('Input first signal variable(tx) :');

t2=input('Input second signal t0:');t3=input('Input second signal t1:'); th=t2:dt:t3;

h = input('Input second signal variable(th) :')

y = dt*conv(x,h); % Compute the convolution of x(t) and h(t) subplot(221)

plot(tx,x), grid on, title('Signal x(t)') xlabel('Time t sec') subplot(222)

plot(th,h), grid on, title('Signal h(t)') xlabel('Time t sec') subplot(313) plot(y), grid on,

convolution of x(t) and xlabel('Time t sec')信号(t)*h(t)的波形图

title('The h(t)')

x (t)、h(t)和x

Q1-10:给定两个离散时间序列

x[n] = 0.5n{u[n]-u[n-8]} h[n] = u[n]-u[n-8]

编写程序Q1_10,计算它们的卷积,并分别绘制x[n]、h[n]和它们的卷积y[n]的图形。

编写的程序Q1_10如下:

n=0:10;

x = (0.5).^n.*(u(n)-u(n-8)); h = u(n)-u(n-8);

y =conv(x,h); % Compute the convolution of x(t) and h(t) subplot(221)

stem(n,x,'.'), grid on, title('Signal x(n)') subplot(222)

stem(n,h,'.'), grid on, title('Signal h(n)') subplot(212)

stem(y), grid on, title('The convolution of x(n) and h(n)'), xlabel('Time t sec');

信号x[n]、h[n]和y[n]的波形图

Q1-11已知一个序列为

x[n]???n,?0,0?n?4otherwise

编写MATLAB程序Q1_11,能够将x[n]以N = 8为周期进行周期延拓得到一个周期为N =8的周期序列y[n],并分别绘制x[n]和y[n]图形。

编写的程序Q1_11如下:

U4.m

function y=u4(n) y=n.*(u(n)-u(n-5));

Q1——11.m clear, close all; n =-16:32 x=u4(n); T = 8; y = 0; for k = -2:4;

y =y+u4(n-k*T); end

subplot(211) stem(n,x,'.'); grid on,

title ('Original signal x(n)') xlabel('Time t sec') subplot(212) stem(n,y);

title ('period signal x(n)') xlabel('Time t sec')

grid on,信号x[n]的波形图 信号y[n]的波形图

搜索更多关于: 信号与系统实验教程(只有答案) 的文档
信号与系统实验教程(只有答案).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c5rgtf7rgud7yogl1itk20zdc523xwm00i4t_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top