File:Raised-cosine filter.svg

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

原始文件(SVG文件,尺寸为585 × 314像素,文件大小:42 KB)


摘要

描述
English: Frequency response of raised cosine filter for different values of .
日期
来源 自己的作品
作者 Krishnavedala
其他版本 File:Raised-cosine-filter.png
SVG开发
InfoField
 
SVG的源代码为有效代码
 
矢量图使用Matplotlib创作。
源代码
InfoField

Python code

from numpy import *
from matplotlib.pyplot import *
from mpl_toolkits.axes_grid.axislines import SubplotZero

def makeT(lim=1):	# Make the X-axis
	result = linspace(-lim,lim,100)
	return result

def sinc(x):		# define normlized sinc function
	return sin(pi*x)/(pi*x)
	
def raisedCos(freq,B=0.,T=1.):	# define raised cosine function
	freq = fabs(freq)
	if freq <= (1.-B)*0.5/T:
		result = T
	elif freq <= (1.+B)*0.5/T:
		temp = freq - (1-B)*0.5/T
		result = 0.5*T*( 1+cos(pi*temp*T/B) )
	else:
		result = 0
	return result
	
fig = figure(figsize=(8,4))
ax = SubplotZero(fig,111)
fig.add_subplot(ax)
ax.grid(True)
ax.set_xticks([-1,-.5,0,.5,1])
ax.set_xticklabels([r"$-\frac{1}{T}$",r"$-\frac{1}{2T}$",\
	"0",r"$\frac{1}{2T}$",r"$\frac{1}{T}$"])
ax.set_ylim((-.3,1.2))
ax.set_yticklabels([])
for direction in ["xzero","yzero"]:
	ax.axis[direction].set_axisline_style("-&#x7C;>")
	ax.axis[direction].set_visible(True)
for direction in ["left","right","bottom","top"]:
	ax.axis[direction].set_visible(False)

t = makeT(1.25)
H0,H1,H2,H3 = [],[],[],[]
for i in t:
	H0 = append(H0,raisedCos(i,0))
	H1 = append(H1,raisedCos(i,0.25))
	H2 = append(H2,raisedCos(i,0.5))
	H3 = append(H3,raisedCos(i,1.))
ax.plot(t,H0,label=r"$\beta=0$")
ax.plot(t,H1,label=r"$\beta=0.25$")
ax.plot(t,H2,label=r"$\beta=0.5$")
ax.plot(t,H3,label=r"$\beta=1$")

ax.text(1.25,0.,r"$f$")
ax.text(0.05,1.15,r"$H(f)$")
ax.legend()
#fig.show()
fig.savefig("Raised-cosine filter.svg",bbox_inches="tight",\
	pad_inches=.15)

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名 相同方式共享
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
您可以选择您需要的许可协议。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2013年6月25日 (二) 15:552013年6月25日 (二) 15:55版本的缩略图585 × 314(42 KB)Edgar.bonetEdited the SVG by hand, minimally, for better accuracy: - the edges of the β=0 curve were slanted, they are now vertical - the β=0.25 curve was visibly piecewise linear, it is now defined with Bézier curves that provide a better and smooth approxima...
2011年6月3日 (五) 18:282011年6月3日 (五) 18:28版本的缩略图585 × 314(46 KB)Krishnavedala{{Information |Description ={{en|1=Frequency response of raised cosine filter for different values of <math>\beta</math>. Created using python and matplotlib library. <syntaxhighlight la

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

元数据