add time vector to spectrum
2 views (last 30 days)
Show older comments
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);
0 Comments
Answers (1)
Star Strider
on 12 Jan 2023
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.
0 Comments
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!