trying to read text file with matlab

1 次查看(过去 30 天)
Kobi
Kobi 2014-12-3
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 RF Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by