| 查看: 1010 | 回复: 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这是什么问题呢? |
» 猜你喜欢
269求调剂
已经有4人回复
一志愿河北工业大学0817化工278分求调剂
已经有7人回复
一志愿211 初试270分 求调剂
已经有5人回复
265求调剂
已经有10人回复
327求调剂
已经有3人回复
材料专业求调剂
已经有9人回复
291求调剂
已经有7人回复
070300化学求调剂
已经有8人回复
材料专硕英一数二306
已经有8人回复
请教下大家 2026年国家基金申请是双盲审吗?
已经有4人回复
霜小妹二
木虫 (正式写手)
哈哈
- 应助: 154 (高中生)
- 金币: 1806.7
- 红花: 25
- 帖子: 531
- 在线: 66小时
- 虫号: 3237838
- 注册: 2014-05-27
- 专业: 机械动力学

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













-iv))==0
回复此楼
5