matlab语句提问有这样一个函数:function DTMFlabel = SegmentDTMF(sigIn,threshold) Len = length(sigIn); DTMFlabel = zeros(Len,1); Ps = zeros(Len,1) % used to store short time power K = 30; % window used to calculate short time power for i =
来源:学生作业帮助网 编辑:作业帮 时间:2024/12/01 18:03:02
matlab语句提问有这样一个函数:function DTMFlabel = SegmentDTMF(sigIn,threshold) Len = length(sigIn); DTMFlabel = zeros(Len,1); Ps = zeros(Len,1) % used to store short time power K = 30; % window used to calculate short time power for i =
matlab语句提问
有这样一个函数:
function DTMFlabel = SegmentDTMF(sigIn,threshold)
Len = length(sigIn);
DTMFlabel = zeros(Len,1);
Ps = zeros(Len,1) % used to store short time power
K = 30; % window used to calculate short time power
for i = 31:(Len-31)
Ps(i) = sum(sigIn(i-K:i+K).^2)/(2*K+1); 【【【【问题在这里!其中的 .^ 是怎么用?】】】】
end
如果有时间帮我看看这个函数,
matlab语句提问有这样一个函数:function DTMFlabel = SegmentDTMF(sigIn,threshold) Len = length(sigIn); DTMFlabel = zeros(Len,1); Ps = zeros(Len,1) % used to store short time power K = 30; % window used to calculate short time power for i =
sigIn(i-K:i+K)--输入信号第i-K个元素到第i+K个元素;
sigIn(i-K:i+K).^2--上述范围内所有元素的平方;
sum(sigIn(i-K:i+K).^2)--上述范围内所有元素的平方和;
sum(sigIn(i-K:i+K).^2)/(2*K+1)--除以(2*K+1),不知道是什么算法;
.^--是求向量的平方,即向量中各个元素的平方;