Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

index exceeded matrix dimensions please help

조회 수: 1 (최근 30일)
dulanga
dulanga 2019년 4월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
I get this error what should i do to correct this?
Index exceeds matrix dimensions.
Error in t31 (line 11)
F1=Fmag((N/2)+1:N);
my code
N=length(t);
Fshifted=fftshift(F);
Fmag=norm(Fshifted);
F1=Fmag((N/2)+1:N);
F2=Fmag(N/2:-1:1);
  댓글 수: 2
per isakson
per isakson 2019년 4월 16일
((N/2)+1:N) is greater than 1
Fmag is a scalar
Thus the error
Walter Roberson
Walter Roberson 2019년 4월 16일
Do not use norm() to find the magnitude of the spectrum. Use abs() .

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by