Return to Snippet

Revision: 67402
at September 18, 2014 10:27 by aturlapaty


Initial Code
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 16 20:13:07 2014

@author: Anish
"""

import os
os.system('cls')
import numpy as np
import matplotlib.pyplot as plt
#a = 2
#plt.figure(1)
nvec11 = np.linspace(1,500,num=500)
nvec2 = nvec11/100
x_t = cos(2*pi*nvec2)    
plt.figure(1)
plt.plot(nvec2,x_t,'r')

#T = 1/1.0
N = 10
Nlim = 7
nvec = np.linspace(1, N, num=N)
nlimvec = np.linspace(0.0, Nlim-1, num=Nlim)
Tvec = 2**(-nlimvec)

plt.figure(2)
for tx in range(1, Nlim):
    nvec1 = nvec*Tvec[tx-1]
    x = cos(2*pi*nvec1)
    plt.subplot(2,3,tx)
    plt.stem(nvec1,x)

plt.figure(3)
nvec11 = np.linspace(1,500,num=500)
nvec3 = nvec11/64
x_t2 = cos(2*pi*nvec3)    
plt.plot(nvec3,x_t2,'og')

Initial URL
sampler

Initial Description
behavior of sampler as the sampling interval changes

Initial Title
Sampling from a continuous signal

Initial Tags


Initial Language
Python