[R] cpgram: confidence band with a chirp signal
Laurent Rhelp
L@urentRHe|p @end|ng |rom |ree@|r
Tue Apr 9 20:58:21 CEST 2024
I answer to myself: I have to generate my signal up to f1 = Fs/2 in
order to have a flat response over the entire frequency range.
Le 09/04/2024 à 19:48, laurentRhelp a écrit :
> Dear RHelp-list,
>
> I generate a swept sine signal using the signal library. I can see
> using the spec.pgram command that the spectrum of this signal is
> white. But when I am calculating the cumulative periodogram using the
> command cpgram the process doesn't stay inside the confidence band
> (cf. code below). I missed something.
>
> May you please explain to me why the process don not stay inside the
> confidence band ?
>
> Thank you
>
> Laurent
>
>
> library(signal)
>
> t1 <- 2
> f0 <- 0
> f1 <- 15000
> Fs <- 44100
> Ts <- 1/Fs
> t <- seq(0,t1-Ts,by=Ts)
> y <- signal::chirp(t=t,f0=f0,t1=t1,f1=f1
> ,form="linear")
> y.ts <- ts(y,frequency=Fs,start=0)
> par( mfrow=c(1,2))
> spec.pgram(y.ts)
> cpgram(y.ts)
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com
More information about the R-help
mailing list