Skip to content
Extraits de code Groupes Projets

Comparer les révisions

Les modifications sont affichées comme si la révision source était fusionnée avec la révision cible. En savoir plus sur la comparaison des révisions.

Source

Sélectionner le projet cible
No results found

Cible

Sélectionner le projet cible
  • mcrucifix/tseries
1 résultat
Afficher les modifications
Validations sur la source (2)
......@@ -62,8 +62,8 @@ plot.mfft_deco <- function (M,periods=FALSE,labels=NULL,...){
}
points(abs(M$Freq), abs(M$Amp),'p',...)
if (!is.null(labels)) {
yshift <- 0.2*range(M$Amp)
text(M$Freq, M$Amp + yshift, labels)
yshift <- 0.05*range(M$Amp)
text(M$Freq, M$Amp + yshift, labels, srt=90, pos=4)
}
}
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/toneCombinations.R
\name{attributeTones}
\alias{attributeTones}
\title{Attribution of combination of tones}
\usage{
attributeTones(infreq, omegas, tol1 = 1e-06, tol2 = 1e-04)
}
\arguments{
\item{infreq}{: input frequencies}
\item{omegas}{: reference frequencies (a numeric vector which may contain explicit row names)}
\item{tol1}{: acceptable tolerance for being considered as a certain attribution
(if several frequencies match the criteria, the closest will be taken)}
\item{tol2}{: acceptable tolerance for being considered as a likely or plausible}
}
\description{
Based on a vector of frequencies (`infreq`), and a vector of referenc
frequencies with row names (it will be input to `toneCombinations`),
attribute the `infreq` frequencies with two possible degrees of tolerance
}
\examples{
omegas <- c( 0.123, 0.14312, 0.33251, 0.554313)
names(omegas) <- c('g1','g2','s1','s2')
outamps <- c(1., 2, 0.2 , 0.5, 0.5)
outfreqs <- c(1., 1.2432, omegas[1]+omegas[3]+0.00000002, omegas[1]-omegas[4]+0.00004, 0.15)
attributions <- attributeTones(outfreqs, omegas)
cbind(outfreqs, attributions)
plot(outfreqs, outamps, type='h')
text(outfreqs, outamps+0.1, attributions)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/toneCombinations.R
\name{toneCombinations}
\alias{toneCombinations}
\title{Generation of combination of tones}
\usage{
toneCombinations(omegas, keepPositives = TRUE)
}
\arguments{
\item{keepPositives}{: if TRUE, then only keeps positive combinations of frequencies}
\item{omegas:}{vector of references frequencies, optionally with rownames,}
}
\value{
a vector with combination of tones and explicit rownames, using, if available, the
rownames provided in the input vector omega
}
\description{
Generates a vector with combinations of an input vector of frequencies, wih
explicit label names, up to order 3 (this could be made more flexible is the future)
}
\examples{
omegas <- c( 0.123, 0.14312, 0.33251, 0.554313)
print(toneCombinations(omegas)
}
\author{
Michel Crucifix
}
Ce diff est replié.