| 查看: 974 | 回复: 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这是什么问题呢? |
» 猜你喜欢
溴的反应液脱色
已经有6人回复
国自然申请面上模板最新2026版出了吗?
已经有8人回复
纳米粒子粒径的测量
已经有7人回复
常年博士招收(双一流,工科)
已经有4人回复
推荐一本书
已经有10人回复
参与限项
已经有5人回复
有没有人能给点建议
已经有5人回复
假如你的研究生提出不合理要求
已经有12人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
霜小妹二
木虫 (正式写手)
哈哈
- 应助: 154 (高中生)
- 金币: 1806.7
- 红花: 25
- 帖子: 531
- 在线: 66小时
- 虫号: 3237838
- 注册: 2014-05-27
- 专业: 机械动力学

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












-iv))==0
回复此楼