add time vector to spectrum

4 次查看(过去 30 天)
GB92_R
GB92_R 2023-1-12
Hi,
i am trying to add a time vector to the spectrum using this scrupt but i cannot do it
Could somebody please help me?
thank you very much in advance!
fs=500
timeLimits = [1 28513];%
endtime = 28513/fs;
Time2 = 0:1/fs:endtime
frequencyLimits = [0 1]; % Normalized frequency (*pi rad/sample)
overlapPercent = 50;
%% compute
Diametre_R2_detrend_ROI = Diametre_R2_detrend(:);
Diametre_R2_detrend_ROI = Diametre_R2_detrend_ROI(timeLimits(1):timeLimits(2));
[P,F,T] = pspectrum(Diametre_R2_detrend_ROI, ...
'spectrogram', ...
'FrequencyLimits',frequencyLimits, ...
'OverlapPercent',overlapPercent);

回答(1 个)

Star Strider
Star Strider 2023-1-12
It is not possible to run that (missing data), and nearly impossible to determine what you want to do.
It is certainly possible to use a time vector as an argument to pspectrum. See t in the Input Arguments documentation section.

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by