Jump to content

File:Sawtooth sampled.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikibooks, open books for an open world

Original file (812 × 612 pixels, file size: 28 KB, MIME type: image/png)

Summary

Description
English: A periodic sawtooth wave represented as both an analog curve and digital samples.
Date
Source Own work
 
This plot was created with Matplotlib.
Author Ldo

Generated with the following code:

import numpy as np
import matplotlib.pyplot as plt

frames_per_cycle = 16
freq = 2
nr_frames = frames_per_cycle * freq
phase = 0
audio = np.fromfunction(lambda y : (y /  frames_per_cycle + phase) % 1 - 0.5, (nr_frames,))

fig, ax = plt.subplots(nrows = 2)
ax[0].plot(np.linspace(0, freq, nr_frames), audio, "-")
ax[0].set_title("Analog")
ax[1].plot(np.linspace(0, freq, nr_frames), audio, "o")
ax[1].set_title("Digital")
plt.subplots_adjust(hspace = 0.5)
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

20 July 2014

File history

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

Date/TimeThumbnailDimensionsUserComment
current06:23, 20 July 2014Thumbnail for version as of 06:23, 20 July 2014812 × 612 (28 KB)LdoUser created page with UploadWizard

The following page uses this file:

Metadata