收藏 分享(赏)

数字信号表示matlab.docx

上传人:eco 文档编号:5284996 上传时间:2019-02-18 格式:DOCX 页数:4 大小:64.80KB
下载 相关 举报
数字信号表示matlab.docx_第1页
第1页 / 共4页
数字信号表示matlab.docx_第2页
第2页 / 共4页
数字信号表示matlab.docx_第3页
第3页 / 共4页
数字信号表示matlab.docx_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、delta = imp_fun(n,n0)where n is a vector of sequential integers and n0 is an integer marking the location of the impulse. For example, the commands n = 0:6;y = imp_fun(n,3);stem(n,y)The impulse function generator can be used to build more complex signals, like yn = 5n - n-2:y=5*imp_fun(n,0) - imp_fu

2、n(n,2);stem(n,y)The function step_fun produces the impulse function un-n0 as follows:u = step_fun(n,n0)where n is a vector of integers and n0 is an integer marking the beginning of the step. For example, the commandsn = -3:7;u = step_fun(n,2);stem(n,u)produces the plot below.A plot of a rectangular

3、pulse like xn = 2(un un-4) may be produced with the commands:n = -2:7;x = 2*(step_fun(n,0)-step_fun(n,4);stem(n,x)Exponential functions can be generated in Matlab using the exp function. For example, the function xn = 2e-0.5n can be plotted using the commands: n = -2:6;x = 2*exp(-0.5*n);stem(n,x)Sam

4、ples of the power function xn = (-0.9)nun are produced as follows:n = -3:8;x = (-0.9).n.*step_fun(n,0);Digital sinusoids are produced using the sin and cos functions provided by Matlab. Some examples are x = 3*sin(pi/8*n) and x = -cos(5*pi/7*n-pi/3), which generate the functions xn = and xn = . Anal

5、og frequencies in Hertz may be converted to digital frequencies in radians using the formulaThe a2d function performs this computation:omega = a2d(f,fs);where omega = . For example, for a sampling frequency of 11025 Hz and an analog frequency 500 Hz, the commandomega = a2d(500,11025)gives 0.0907, so

6、 the corresponding digital frequency is 0.0907. Digital frequencies may be converted into analog frequencies in Hertz using the formula:The function d2a performs the conversion as follows:f = d2a(omega,fs);where omega = . For example, for a sampling frequency of 16 kHz, the digital frequency 0.35 radians corresponds to f = d2a(0.35,16000);or 2800 Hz.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 实用文档 > 统计图表

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报