Undefined function periodgram for input arguments of type double?
5 次查看(过去 30 天)
显示 更早的评论
Hello!
I am trying to use the function periodgram in order to plot a timeseries (x) which was an 100x4 matrix.
Fs = 400
x = x(:,1)
[PSD, normalized_frequency] = periodgram(x,Fs)
I am getting the following error:
Error in periodogram (line 202)
if any([signal.internal.sigcheckfloattype(x1,'single','periodogram','X')...
Undefined function 'periodgram' for input arguments of type 'double'.
end
when I went to go look at the documentation, I got this message:
Input X in periodogram must be double/single, instead it was char.
Which seems to be giving mixed messages.
I tried the following:
%1) converting double to single
x = x(:,1);
x = single(x);
[PSD, norm_frequency] = periodgram(x, Fs)
Do you have any suggestions?
Thanks so much.
0 个评论
采纳的回答
Star Strider
2022-6-17
It would be nice to know what ‘x’ is.
If it is a table, the reference should be:
x{:,1}
(note the curly braces {}) instead.
6 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!