Posez n’importe quelle question sur les cours, conférences, exercices, recherches, actualités, etc. de l’EPFL ou essayez les exemples de questions ci-dessous.
AVERTISSEMENT : Le chatbot Graph n'est pas programmé pour fournir des réponses explicites ou catégoriques à vos questions. Il transforme plutôt vos questions en demandes API qui sont distribuées aux différents services informatiques officiellement administrés par l'EPFL. Son but est uniquement de collecter et de recommander des références pertinentes à des contenus que vous pouvez explorer pour vous aider à répondre à vos questions.
In mathematics, sine and cosine are trigonometric functions of an angle. The sine and cosine of an acute angle are defined in the context of a right triangle: for the specified angle, its sine is the ratio of the length of the side that is opposite that angle to the length of the longest side of the triangle (the hypotenuse), and the cosine is the ratio of the length of the adjacent leg to that of the hypotenuse. For an angle , the sine and cosine functions are denoted simply as and . More generally, the definitions of sine and cosine can be extended to any real value in terms of the lengths of certain line segments in a unit circle. More modern definitions express the sine and cosine as infinite series, or as the solutions of certain differential equations, allowing their extension to arbitrary positive and negative values and even to complex numbers. The sine and cosine functions are commonly used to model periodic phenomena such as sound and light waves, the position and velocity of harmonic oscillators, sunlight intensity and day length, and average temperature variations throughout the year. They can be traced to the and functions used in Indian astronomy during the Gupta period. Trigonometric functions#Notation Sine and cosine are written using functional notation with the abbreviations sin and cos. Often, if the argument is simple enough, the function value will be written without parentheses, as sin θ rather than as sin(θ). Each of sine and cosine is a function of an angle, which is usually expressed in terms of radians or degrees. Except where explicitly stated otherwise, this article assumes that the angle is measured in radians. To define the sine and cosine of an acute angle α, start with a right triangle that contains an angle of measure α; in the accompanying figure, angle α in triangle ABC is the angle of interest. The three sides of the triangle are named as follows: The opposite side is the side opposite to the angle of interest, in this case side a. The hypotenuse is the side opposite the right angle, in this case side h.
def rotation_matrix(d):
"""
Calculates a rotation matrix given a vector d. The direction of d
corresponds to the rotation axis. The length of d corresponds to
the sin of the angle of rotation.
Variant of: http://mail.scipy.org/pipermail/numpy-discuss
[2]Paolo Prandoni, [3]LCAV, EPFL
In this notebook we will investigate the effect of phase on the
perceptual quality of a sound. It is often said that the human ear is
commercial-grade audio equipment takes place in the magnitude domain
only.
In [1]:
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import IPython
from scipy.io import wavfile
In [2]:
plt.rcParams["figure.fig