How to remove Index exceeds matrix dimensions error ?
Afficher commentaires plus anciens
I am implimenting an algorithm for direction of arrival of signal estimation.For that i first store the angle information in a mat file n then loading it into the code.In this code s=a1,where a1 is the first signal and this variable contains the angle information i.e 30 degrees.but when i run my full code its giving me Index exceeds matrix dimensions error.Sir Please help me.
degree = 180; divisor_factor=32;
c = 346.287; K = 100; % Number of frequency snapshots Fs = 50000;% Sampling frequency T=1/Fs; f = 3000;% Signal frequency M = 8; dist = .03; xx = dist*[0:M-1];
theta_test = [1:1:degree-1]*pi/180; % Test vector of theta values (from 0 to 180 deg) length_t = length(theta_test); % Number of trial angles
load angledata s=a1; % a1-a5 correspond to data of 5 different incident angles % s is a 102400 by 8 matrix. The length of each of the 8 sequences may be longer than 102400 lfft=1024*1; % number of data points for FFT in a snapshot df = Fs/lfft/1; % frequency grid size F = 0:df:Fs/1-df; for ih=1:M for iv=1:K pos=(iv-1)*lfft+1; tmp=s(pos:pos+lfft-1,ih); %IN THIS ERROR IS SHOWGING X(:,ih,iv)=fft(tmp); end end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Array Geometries and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!