Error in ()-indexing must appear last in an index expression.
1 次查看(过去 30 天)
显示 更早的评论
can any one help me to rectify this error Thank you in advance.
for i=1:NumFrames
ft(i,:)=abs(fft(windowed(i,:))(1:frameSize/2));
end
1 个评论
Rik
2017-2-16
Please give the complete stack of the error and explain the thing you want to do. You could also have a look here for a few pointers on how to ask a question so you increase the chance on a fast answer.
采纳的回答
Rik
2017-2-16
I think your problem is this:
You call a function, whose result is a vector, from which you need only specific values. In Matlab, you can't combine those two things. (If you use cells, you can most of the times)
for i=1:NumFrames
temp=fft(windowed(i,:));
ft(i,:)=abs(temp(1:frameSize/2));
%you need to be sure that frameSize is even, if you are not, use round(frameSize/2)
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!