I would like to use pwelch to perform PSD on my long term acoustic data. The data is 120 seconds long, sampled at 144kHz.
How do I decide what to set nfft as? Is it correct that I have set it as the length of my sampled data?
[pxx,f]=pwelch(calxbit, segmentLength, 0.5, nfft, fs);
When I run this code, I get the error:
Warning: Integer operands are required for colon operator when used as index.
> In welch>localComputeSpectra (line 316)
In welch (line 99)
In pwelch (line 162)
Thanks for your help!