ImageVerifierCode 换一换
格式:DOC , 页数:24 ,大小:178.10KB ,
资源ID:11987522      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/11987522.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(实验用Matlab基本函数.doc)为本站上传会员【仙人****88】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

实验用Matlab基本函数.doc

1、 实验用Matlab基本函数 1.abs Absolute value (magnitude) Syntax y = abs(x) Description y = abs(x) returns the absolute value of the elements of x. If x is complex, abs returns the complex modulus (magnitude). abs(x) = sqrt(real(x).^2 + imag(x).^2) If x is a MATLAB string, abs returns the numer

2、ic values of the ASCII characters in the string. The display format of the string changes; the internal representation does not. The abs function is part of the standard MATLAB language. Example Calculate the magnitude of the FFT of a sequence. t = (0:99)/100; % time v

3、ector x = sin(2*pi*15*t) + sin(2*pi*40*t); % signal y = fft(x); % compute DFT of x m = abs(y); % magnitude Plot the magnitude. f = (0:length(y)-1)'/length(y)*100; % frequency vector plot(f,m) 2. angle Phase angle Syntax p = angle(h)

4、 Description p = angle(h) returns the phase angles, in radians, of the elements of complex vector or array h. The phase angles lie between - and . For complex sequence h = x + iy = meip, the magnitude and phase are given by m = abs(h) p = angle(h) To convert to the original h from its mag

5、nitude and phase, type i = sqrt(-1) h = m.*exp(i*p) The angle function is part of the standard MATLAB language. Example Calculate the phase of the FFT of a sequence. t = (0:99)/100; % time vector x = sin(2*pi*15*t) + sin(2*pi*40*t); % signal y = fft(x);

6、 % compute DFT of x p = unwrap(angle(y)); % phase Plot the phase. f = (0:length(y)-1)'/length(y)*100; % frequency vector plot(f,p) Algorithm angle can be expressed as angle(x) = imag(log(x)) = atan2(imag(x),real(x)) 3. besself Bessel analog filter design

7、 Syntax [b,a] = besself(n,Wn) [b,a] = besself(n,Wn,'ftype') [z,p,k] = besself(...) [A,B,C,D] = besself(...) Description besself designs lowpass, bandpass, highpass, and bandstop analog Bessel filters. Analog Bessel filters are characterized by almost constant group delay across the entire

8、 passband, thus preserving the wave shape of filtered signals in the passband. Digital Bessel filters do not retain this quality, and besself therefore does not support the design of digital Bessel filters. [b,a] = besself(n,Wn) designs an order n lowpass analog filter with cutoff frequency Wn. I

9、t returns the filter coefficients in the length n+1 row vectors b and a, with coefficients in descending powers of s, derived from the transfer function Cutoff frequency is the frequency at which the magnitude response of the filter begins to decrease significantly. For besself, the cutoff freque

10、ncy Wn must be greater than 0. The magnitude response of a Bessel filter designed by besself is always less than at the cutoff frequency, and it decreases as the order n increases. If Wn is a two-element vector, Wn = [w1 w2] with w1 < w2, then besself(n,Wn) returns an order 2*n bandpass analog f

11、ilter with passband w1 <ω< w2. [b,a] = besself(n,Wn,'ftype') designs a highpass or bandstop filter, where the string 'ftype' is: l 'high' for a highpass analog filter with cutoff frequency Wn l 'stop' for an order 2*n bandstop analog filter if Wn is a two-element vector, Wn = [w1 w2] The

12、 stopband is w1 <ω< w2. With different numbers of output arguments, besself directly obtains other realizations of the analog filter. To obtain zero-pole-gain form, use three output arguments as shown below. [z,p,k] = besself(n,Wn) or [z,p,k] = besself(n,Wn,'ftype') returns the zeros and po

13、les in length n or 2*n column vectors z and p and the gain in the scalar k. Algorithm besself performs a four-step algorithm: l It finds lowpass analog prototype poles, zeros, and gain using the besselapfunction. l It converts the poles, zeros, and gain into state-space form. l It transform

14、s the lowpass filter into a bandpass, highpass, or bandstop filterwith desired cutoff frequencies using a state-space transformation. l It converts the state-space filter back to transfer function or zero-pole-gain form, as required. 4. bilinear Bilinear transformation method for analog-to-digi

15、tal filter conversion Syntax [zd,pd,kd] = bilinear(z,p,k,fs) [zd,pd,kd] = bilinear(z,p,k,fs,Fp) [numd,dend] = bilinear(num,den,fs) [numd,dend] = bilinear(num,den,fs,Fp) [Ad,Bd,Cd,Dd] = bilinear(A,B,C,D,fs) [Ad,Bd,Cd,Dd] = bilinear(A,B,C,D,fs,Fp) Description The bilinear transformation i

16、s a mathematical mapping of variables. In digital filtering, it is a standard method of mapping the s or analog plane into the z or digital plane. It transforms analog filters, designed using classical filter design techniques, into their discrete equivalents. Zero-Pole-Gain [zd,pd,kd] = bilinea

17、r(z,p,k,fs) and [zd,pd,kd] = bilinear(z,p,k,fs,Fp) convert the s-domain transfer function specified by z, p, and k to a discrete equivalent. Inputs z and p are column vectors containing the zeros and poles, k is a scalar gain, and fs is the sampling frequency in hertz. bilinear returns the discre

18、te equivalent in column vectors zd and pd and scalar kd. Fp is the optional match frequency, in hertz, for prewarping. Transfer Function [numd,dend] = bilinear(num,den,fs) and [numd,dend] = bilinear(num,den,fs,Fp) convert an s-domain transfer function given by num and den to a discrete equiva

19、lent. Row vectors num and den specify the coefficients of the numerator and denominator, respectively, in descending powers of s. fs is the sampling frequency in hertz. bilinear returns the discrete equivalent in row vectors numd and dend in descending powers of z (ascending powers of z-1). Fp is

20、 the optional match frequency, in hertz, for prewarping. 5. butter Butterworth analog and digital filter design Syntax [b,a] = butter(n,Wn) [b,a] = butter(n,Wn,'ftype') [b,a] = butter(n,Wn,'s') [b,a] = butter(n,Wn,'ftype','s') [z,p,k] = butter(...) [A,B,C,D] = butter(...) Description

21、 butter designs lowpass, bandpass, highpass, and bandstop digital and analog Butterworth filters. Butterworth filters are characterized by a magnitude response that is maximally flat in the passband and monotonic overall. Butterworth filters sacrifice rolloff steepness for monotonicity in the pa

22、ss- and stopbands. Unless the smoothness of the Butterworth filter is needed, an elliptic or Chebyshev filter can generally provide steeper rolloff characteristics with a lower filter order. Digital Domain [b,a] = butter(n,Wn) designs an order n lowpass digital Butterworth filter with cutoff fre

23、quency Wn. It returns the filter coefficients in length n+1 row vectors b and a, with coefficients in descending powers of z. Cutoff frequency is that frequency where the magnitude response of the filter is . For butter, the normalized cutoff frequency Wn must be a number between 0 and 1, where

24、1 corresponds to the Nyquist frequency, π radians per sample. If Wn is a two-element vector, Wn = [w1 w2], butter returns an order 2*n digital bandpass filter with passband w1 <ω< w2. [b,a] = butter(n,Wn,'ftype') designs a highpass or bandstop filter, where the string 'ftype' is either: l '

25、high' for a highpass digital filter with cutoff frequency Wn l 'stop' for an order 2*n bandstop digital filter if Wn is a two-element vector, Wn = [w1 w2]. The stopband is w1 <ω< w2. With different numbers of output arguments, butter directly obtains other realizations of the filter. To obtain

26、zero-pole-gain form, use three output arguments as shown below. [z,p,k] = butter(n,Wn) or [z,p,k] = butter(n,Wn,'ftype') returns the zeros and poles in length n column vectors z and p, and the gain in the scalar k. Analog Domain [b,a] = butter(n,Wn,'s') designs an order n lowpass analog Bu

27、tterworth filter with cutoff frequency Wn rad/s. It returns the filter coefficients in the length n+1 row vectors b and a, in descending powers of s, derived from the transfer function butter's cutoff frequency Wn must be greater than 0 rad/s. If Wn is a two-element vector with w1 < w2, butter

28、n,Wn,'s') returns an order 2*n bandpass analog filter with passband w1 <ω< w2. [b,a] = butter(n,Wn,'ftype','s') designs a highpass or bandstop filter. With different numbers of output arguments, butter directly obtains other realizations of the analog filter. To obtain zero-pole-gain form, us

29、e three output arguments as shown below. [z,p,k] = butter(n,Wn,'s') or [z,p,k] = butter(n,Wn,'ftype','s') returns the zeros and poles in length n or 2*n column vectors z and p and the gain in the scalar k. Examples Example 1 For data sampled at 1000 Hz, design a 9th-order highpass Butterw

30、orth filter with cutoff frequency of 300 Hz. [b,a] = butter(9,300/500,'high'); The filter's frequency response is freqz(b,a,128,1000) Example 2 Design a 10th-order bandpass Butterworth filter with a passband from 100 to 200 Hz and plot its impulse response, or unit sample response. n =

31、 5; Wn = [100 200]/500; [b,a] = butter(n,Wn); [y,t] = impz(b,a,101); stem(t,y) 6. cheby1 Chebyshev Type I filter design (passband ripple) Syntax [b,a] = cheby1(n,Rp,Wn) [b,a] = cheby1(n,Rp,Wn,'ftype') [b,a] = cheby1(n,Rp,Wn,'s') [b,a] = cheby1(n,Rp,Wn,'ftype','s') [z,p,k] = cheby1(...

32、) [A,B,C,D] = cheby1(...) Description cheby1 designs lowpass, bandpass, highpass, and bandstop digital and analog Chebyshev Type I filters. Chebyshev Type I filters are equiripple in the passband and monotonic in the stopband. Type I filters roll off faster than type II filters, but at the expe

33、nse of greater deviation from unity in the passband. Digital Domain [b,a] = cheby1(n,Rp,Wn) designs an order n Chebyshev lowpass digital Chebyshev filter with cutoff frequency Wn and Rp dB of peak-to-peak ripple in the passband. It returns the filter coefficients in the length n+1 row vectors b

34、and a, with coefficients in descending powers of z. Cutoff frequency is the frequency at which the magnitude response of the filter is equal to -Rp dB. For cheby1, the cutoff frequency Wn is a number between 0 and 1, where 1 corresponds to the Nyquist frequency, π radians per sample. Smaller valu

35、es of passband ripple Rp lead to wider transition widths (shallower rolloff characteristics). If Wn is a two-element vector, Wn = [w1 w2], cheby1 returns an order 2*n bandpass filter with passband w1 <ω< w2. [b,a] = cheby1(n,Rp,Wn,'ftype') designs a highpass or bandstop filter, where the strin

36、g 'ftype' is either: l 'high' for a highpass digital filter with cutoff frequency Wn l 'stop' for an order 2*n bandstop digital filter if Wn is a two-element vector, Wn = [w1 w2] The stopband is w1 <ω< w2. With different numbers of output arguments, cheby1 directly obtains other realizati

37、ons of the filter. To obtain zero-pole-gain form, use three output arguments as shown below. [z,p,k] = cheby1(n,Rp,Wn) or [z,p,k] = cheby1(n,Rp,Wn,'ftype') returns the zeros and poles in length n column vectors z and p and the gain in the scalar k. Analog Domain [b,a] = cheby1(n,Rp,Wn,'s')

38、 designs an order n lowpass analog Chebyshev Type I filter with cutoff frequency Wn rad/s. It returns the filter coefficients in length n+1 row vectors b and a, in descending powers of s, derived from the transfer function Cutoff frequency is the frequency at which the magnitude response of the f

39、ilter is -Rp dB. For cheby1, the cutoff frequency Wn must be greater than 0 rad/s. If Wn is a two-element vector Wn = [w1 w2] with w1 < w2, then cheby1(n,Rp,Wn,'s') returns an order 2*n bandpass analog filter with passband w1 <ω< w2. [b,a] = cheby1(n,Rp,Wn,'ftype','s') designs a highpass or ba

40、ndstop filter. You can supply different numbers of output arguments for cheby1 to directly obtain other realizations of the analog filter. To obtain zero-pole-gain form, use three output arguments as shown below. [z,p,k] = cheby1(n,Rp,Wn,'s') or [z,p,k] = cheby1(n,Rp,Wn,'ftype','s') returns

41、 the zeros and poles in length n or 2*n column vectors z and p and the gain in the scalar k. Examples Example 1: Lowpass Filter For data sampled at 1000 Hz, design a 9th-order lowpass Chebyshev Type I filter with 0.5 dB of ripple in the passband and a cutoff frequency of 300 Hz. [b,a] = cheb

42、y1(9,0.5,300/500); The frequency response of the filter is freqz(b,a,512,1000) Example 2: Bandpass Filter Design a 10th-order bandpass Chebyshev Type I filter with a passband from 100 to 200 Hz and plot its impulse response. n = 10; Rp = 0.5; Wn = [100 200]/500; [b,a] = cheby1(n,Rp,Wn);

43、 [y,t] = impz(b,a,101); stem(t,y) 7. conv Convolution and polynomial multiplication Syntax c = conv(a,b) Description c = conv(a,b) convolves vectors a and b. The convolution sum is where N is the maximum sequence length. The series is indexed from n + 1 and k + 1 instead of the usual

44、 n and k because MATLAB vectors run from 1 to n instead of from 0 to n-1. The conv function is part of the standard MATLAB language. Example The convolution of a = [1 2 3] and b = [4 5 6] is c = conv(a,b) c = 4 13 28 27 18 8. ellip Elliptic (Cauer) filter design Syntax

45、 [b,a] = ellip(n,Rp,Rs,Wn) [b,a] = ellip(n,Rp,Rs,Wn,'ftype') [b,a] = ellip(n,Rp,Rs,Wn,'s') [b,a] = ellip(n,Rp,Rs,Wn,'ftype','s') [z,p,k] = ellip(...) [A,B,C,D] = ellip(...) Description ellip designs lowpass, bandpass, highpass, and bandstop digital and analog elliptic filters. Elliptic fil

46、ters offer steeper rolloff characteristics than Butterworth or Chebyshev filters, but are equiripple in both the pass- and stopbands. In general, elliptic filters meet given performance specifications with the lowest order of any filter type. Digital Domain [b,a] = ellip(n,Rp,Rs,Wn) designs an o

47、rder n lowpass digital elliptic filter with cutoff frequency Wn, Rp dB of ripple in the passband, and a stopband Rs dB down from the peak value in the passband. It returns the filter coefficients in the length n+1 row vectors b and a, with coefficients in descending powers of z. The cutoff freque

48、ncy is the edge of the passband, at which the magnitude response of the filter is -Rp dB. For ellip, the cutoff frequency Wn is a number between 0 and 1, where 1 corresponds to half the sampling frequency (Nyquist frequency). Smaller values of passband ripple Rp and larger values of stopband attenua

49、tion Rs both lead to wider transition widths (shallower rolloff characteristics). If Wn is a two-element vector, Wn = [w1 w2], ellip returns an order 2*n bandpass filter with passband w1 <ω< w2. [b,a] = ellip(n,Rp,Rs,Wn,'ftype') designs a highpass or bandstop filter, where the string 'ftype' i

50、s either: l 'high' for a highpass digital filter with cutoff frequency Wn l 'stop' for an order 2*n bandstop digital filter if Wn is a two-element vector, Wn = [w1 w2]. The stopband is w1 <ω< w2. With different numbers of output arguments, ellip directly obtains other realizations of the fil

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服