Confidence intervals for the coherence and phase calculated by CPSD

5 views (last 30 days)
How can I calculate the confidence bands for the coherence and phase calculated by CPSD? In contrast to a command like pwelch I cannot find any argument like 'ConfidenceLevel'.

Answers (1)

Ayush Gupta
Ayush Gupta on 26 Aug 2020
There is no argument specifically for Confidence level in CSPD. Instead confidence level can be calculated with the help of percentile method. The following code can be leveraged for this.
% x is a vector, matrix, or any numeric array of data. NaNs are ignored.
% p is the confidence level (ie, 95 for 95% CI)
% The output is 1x2 vector showing the [lower,upper] interval values.
CIFcn = @(x,p)prctile(x,abs([0,100]-(100-p)/2));




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!