Error in ()-indexing must appear last in an index expression.

조회 수: 1 (최근 30일)
Manjutha Manavalan
Manjutha Manavalan 2017년 2월 16일
댓글: Manjutha Manavalan 2017년 2월 17일
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
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
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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by