File:Raised-cosine-impulse.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 585 × 314 pixels, file size: 44 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Impulse response of raised-cosine filter given by h(t)=sinc(tT)cos⁡(πβtT)(11−4β2t2T2)

    for different values of β.

    Created using python and matplotlib library.

    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(x,B=0,T=1):	# define raised cosine function
    	return sinc(x/T) * cos(pi*B*x/T) / (1 - (4*B*B*x*x/(T*T)) )
    	
    fig = figure(figsize=(8,4))
    ax = SubplotZero(fig,111)
    fig.add_subplot(ax)
    ax.grid(True)
    ax.set_xticks([-3,-2,-1,0,1,2,3])
    ax.set_xticklabels(["-3T","-2T","-T","0","T","2T","3T"])
    ax.set_ylim((-.3,1.2))
    ax.set_yticklabels([])
    for direction in ["xzero","yzero"]:
    	ax.axis[direction].set_axisline_style("->")
    	ax.axis[direction].set_visible(True)
    for direction in ["left","right","bottom","top"]:
    	ax.axis[direction].set_visible(False)
    
    t = makeT(3.5)
    ax.plot(t,raisedCos(t),label=r"$\beta=0$")
    ax.plot(t,raisedCos(t,0.25),label=r"$\beta=0.25$")
    ax.plot(t,raisedCos(t,0.5),label=r"$\beta=0.5$")
    ax.plot(t,raisedCos(t,1.),label=r"$\beta=1$")
    
    ax.text(3.5,0.,"t")
    ax.text(0.1,1.1,"h(t)")
    ax.legend()
    #fig.show()
    fig.savefig("Raised-cosine-impulse.svg",bbox_inches="tight",\
    	pad_inches=.15)
    
    Date
    Source Own work
    Author Krishnavedala
    Other versions File:Raised-cosine-impulse.png

    Licensing

    I, the copyright holder of this work, hereby publish it under the following licenses:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
    GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
    You may select the license of your choice.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    3 June 2011

    44,719 byte

    image/svg+xml

    ca0544976ac145bf682b01f7944b1579ec2f2aa1

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current22:58, 28 August 2011Thumbnail for version as of 22:58, 28 August 2011585 × 314 (44 KB)wikimediacommons>KrishnavedalaCorrected the X-axis labels

    There are no pages that use this file.