- 这个错误提示下面有说是因为pwelch()函数未定义’double’类型的数据
- 所以就打开了spectopo.m(因为我实在是找不到toolbox-functions路径下叫做spectcomp()的函数了)
- 打开之后查看941行,长这样:
if usepwelch
[tmpspec,freqs] = pwelch(matsel(tmpdata,frames,0,1,e),…
确实有pwelch函数。 - 我的想法是要不打开pwelch改下,然后在滑代码的过程中看到了这个:
% spectopo() - Plot the power spectral density (PSD) of winsize length segments of data
% epochs at all channels as a bundle of traces. At specified frequencies,
% plot the relative topographic distribution of PSD. If available, uses
% pwelch() from the Matlab signal processing toolbox, else the EEGLAB spec()
% function. Plots the mean spectrum for all of the supplied data, not just
% the pre-stimulus baseline.
也就是说有个优先顺序的。。
那就姑且装一个signal processing toolbox试试,登录MathWorks账户安装就可以,然后重试ok了。处理信号的工具包不接受double类型的数据确实说不过去。Way to go! - 当然肯定把double类型转换成其他的数据类型应该也是ok的。
EEGLAB error in function spectcomp() at line 941 解决方案
最新推荐文章于 2023-06-30 10:01:41 发布