trying to read text file with matlab

1 visualización (últimos 30 días)
Kobi
Kobi el 3 de Dic. de 2014
Comentada: per isakson el 4 de Dic. de 2014
the function give me unexpected resault so i'm not so sure that i read it correctly i have doubts about this section:
% filter messurements by frequancy
frequancy=frequencies(k); % [GHz]
loc_f=find(freq==frequancy);
tx_pos=tx_pos(loc_f);
rx_pos=rx_pos(loc_f);
freq=freq(loc_f);
reEtot=reEtot(loc_f);
imEtot=imEtot(loc_f);
reEinc=reEinc(loc_f);
imEinc=imEinc(loc_f);
% taking under considiration the incident E wave
Etot=reEtot+1i*imEtot;
Einc=reEinc+1i*imEinc;
Escat=Etot-Einc;
%%build the matrix rx_pos x tx_pos
H{k}=zeros(max(rx_pos),max(tx_pos));
LinInd=sub2ind(size(H{k}),rx_pos,tx_pos);
H{k}(LinInd)=Escat;
on the exp file listed above the first column is the emmiting antenna index the seond column is the reciving antenna index the third column is the frequancy the other columns are the electric field (in this i'm sure)
i need to seperate each measurement by the frequancy and to recive a 2D matrix with x axis for the emmiting antenna and y axis for the reciveing antenna for this i use this:
%%build the matrix rx_pos x tx_pos
*H{k}=zeros(max(rx_pos),max(tx_pos));
LinInd=sub2ind(size(H{k}),rx_pos,tx_pos);
H{k}(LinInd)=Escat;*
from this i recive matrix of zeros that is greater then what i need i need to fill the Escat values in the H matrix according to their index
  1 comentario
per isakson
per isakson el 4 de Dic. de 2014
In what way "unexpected result" ? And how do you call the function?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by