Learn R Programming

rPraat (version 1.3.2-1)

it.legendre: it.legendre

Description

Interpolate the IntensityTier in npoints equidistant points and approximate it by Legendre polynomials

Usage

it.legendre(it, npoints = 1000, npolynomials = 4)

Arguments

it

IntensityTier object

npoints

Number of points of IntensityTier interpolation

npolynomials

Number of polynomials to be used for Legendre modelling

Value

Vector of Legendre polynomials coefficients

See Also

it.legendreSynth, it.legendreDemo, it.cut, it.cut0, it.read, it.plot, it.interpolate

Examples

Run this code
# NOT RUN {
it <- it.sample()
it <- it.cut(it, tStart = 0.2, tEnd = 0.4)  # cut IntensityTier and preserve time
c <- it.legendre(it)
print(c)
leg <- it.legendreSynth(c)
itLeg <- it
itLeg$t <- seq(itLeg$tmin, itLeg$tmax, length.out = length(leg))
itLeg$i <- leg
# }
# NOT RUN {
plot(it$t, it$i, xlab = "Time (sec)", ylab = "Intensity (dB)")
lines(itLeg$t, itLeg$i, col = "blue")
# }

Run the code above in your browser using DataLab