Changeset 6819


Ignore:
Timestamp:
Apr 16, 2009, 9:18:06 AM (16 years ago)
Author:
rwilson
Message:

Convert Numeric to numpy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy_misc/tools/demos/matplotdemo3.py

    r3187 r6819  
    1 from Numeric import arange, sin, exp, pi
     1import numpy as num
    22from pylab import randn, conv, plot, psd, subplot, show
    33
     
    55# Create signal
    66dt = 0.01
    7 t = arange(0, 10, dt)    # Time vector
    8 signal = 0.1*sin(2*pi*t)
     7t = num.arange(0, 10, dt)    # Time vector
     8signal = 0.1*num.sin(2*num.pi*t)
    99
    1010# Create noise
    11 noise = conv(randn(len(t)), exp(-t/0.05))*dt
     11noise = conv(randn(len(t)), num.exp(-t/0.05))*dt
    1212noise = noise[:len(t)]
    1313
Note: See TracChangeset for help on using the changeset viewer.