Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

index exceeded matrix dimensions please help

1 visualizzazione (ultimi 30 giorni)
dulanga
dulanga il 16 Apr 2019
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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 Commenti
per isakson
per isakson il 16 Apr 2019
((N/2)+1:N) is greater than 1
Fmag is a scalar
Thus the error
Walter Roberson
Walter Roberson il 16 Apr 2019
Do not use norm() to find the magnitude of the spectrum. Use abs() .

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by