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檔案的原始碼通過W3C驗證
 
vector image使用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:創用CC
姓名標示 相同方式分享
您可以自由:
  • 分享 – 複製、發佈和傳播本作品
  • 重新修改 – 創作演繹作品
惟需遵照下列條件:
  • 姓名標示 – 您必須指名出正確的製作者,和提供授權條款的連結,以及表示是否有對內容上做出變更。您可以用任何合理的方式來行動,但不得以任何方式表明授權條款是對您許可或是由您所使用。
  • 相同方式分享 – 如果您利用本素材進行再混合、轉換或創作,您必須基於如同原先的相同或兼容的條款,來分布您的貢獻成品。
GNU head 已授權您依據自由軟體基金會發行的無固定段落、封面文字和封底文字GNU自由文件授權條款1.2版或任意後續版本,對本檔進行複製、傳播和/或修改。該協議的副本列在GNU自由文件授權條款中。
您可以選擇您需要的授權條款。

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸使用者備⁠註
目前2013年6月25日 (二) 15:55於 2013年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:28於 2011年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 使用了這個檔案:

詮釋資料