필터 지우기
필터 지우기

trying to read text file with matlab

조회 수: 4 (최근 30일)
Kobi
Kobi 2014년 12월 3일
댓글: per isakson 2014년 12월 4일
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
per isakson
per isakson 2014년 12월 4일
In what way "unexpected result" ? And how do you call the function?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by