| 查看: 1073 | 回复: 1 | ||
[求助]
matlab中排列熵程序出错 已有1人参与
|
|
请教,程序如下,请大神帮帮忙, function [pe hist c] = pec(y,m,t) % Calculate the permutation entropy % Input: y: time series; % m: order of permuation entropy % t: delay time of permuation entropy, % Output: % pe: permuation entropy % hist: the histogram for the order distribution %Ref: G Ouyang, J Li, X Liu, X Li, Dynamic Characteristics of Absence EEG Recordings with Multiscale Permutation % % Entropy Analysis, Epilepsy Research, doi: 10.1016/j.eplepsyres.2012.11.003 % X Li, G Ouyang, D Richards, Predictability analysis of absence seizures with permutation entropy, Epilepsy % % Research, Vol. 77pp. 70-74, 2007 ly = length(y); permlist = perms(1:m); c(1:length(permlist))=0; for j=1:ly-t*(m-1) [a,iv]=sort(y(j:t:j+t*(m-1))); for jj=1:length(permlist) if (abs(permlist(jj, -iv))==0c(jj) = c(jj) + 1 ; end end end hist = c; c=hist(find(hist~=0)); p = c/sum(c); pe = -sum(p .* log(p)); % normalizedpe=pe/log(factorial(m)); 程序如上所示,请问我在运行时出现错误 >> pec(a,2,6) 错误使用 - 矩阵维度必须一致。 出错 pec (line 25) if (abs(permlist(jj, -iv))==0这是什么问题呢? |
» 猜你喜欢
售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急
已经有7人回复
售SCI一区T0P文章,我:8.O.55.1.O.54,科目齐全,可+急
已经有11人回复
什么时候能放榜呀?
已经有3人回复
一个有机合成实验室都需要哪些设备?
已经有8人回复
UV压敏胶开发
已经有5人回复
面上提前没消息,有中的吗
已经有16人回复
面上再次挂了,太难了,躺也躺不了,倦也卷不过,小学校之殇!
已经有25人回复
2026年国自然面上资助率
已经有22人回复
基础研究怎么拉横向,学校到款任务越来越多,难以完成 拉横向,都有哪些途径啊
已经有12人回复
微信指数没变化,科研之友没阅读
已经有19人回复
霜小妹二
木虫 (正式写手)
哈哈
- 应助: 154 (高中生)
- 金币: 1806.7
- 红花: 25
- 帖子: 531
- 在线: 66小时
- 虫号: 3237838
- 注册: 2014-05-27
- 专业: 机械动力学

2楼2016-03-28 21:03:03










-iv))==0
回复此楼