标题:??? Subscript indices must either be real positive integers or logical ...
只看楼主
changelz
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-9-11
 问题点数:0 回复次数:0 
??? Subscript indices must either be real positive integers or logicals.这是什么原因呢
disp('正在计算参考模板的参数...')
for i=1:10
    fname = sprintf('0.wav',i-1);
    x = wavread(fname);
    [x1,x2] = vad(x);
    m = mfcc(x);
    m = m(x1-2:x2-2,:);
    ref(i).mfcc = m;
end
disp('正在计算测试模板的参数...')
for i=1:10
    fname = sprintf('t0.wav',i-1);
    x = wavread(fname);
    [x1,x2] = vad(x);
    m = mfcc(x);
    m = m(x1-2:x2-2,:);
    test(i).mfcc = m;
end
disp('正在进行模板匹配...')
dist = zeros(10,10);
for i=1:10
for j=1:10
    dist(i,j) = dtw(test(i).mfcc, ref(j).mfcc);
end
end
disp('正在计算匹配结果...')
for i=1:10
    [d,j] = min(dist(i,:));
    fprintf('测试模板 %d 的识别结果为:%d\n', i, j);
end
正在计算参考模板的参数...
??? Subscript indices must either be real positive integers or logicals.
搜索更多相关主题的帖子: 计算 either positive 
2012-09-11 22:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-381201-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.390140 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved