필터 지우기
필터 지우기

very slow any other way to do it?

조회 수: 2 (최근 30일)
sharif
sharif 2014년 7월 3일
편집: Cedric 2014년 7월 3일
clear, clc, close all;
N=1024; Cp=64; zf=[]; NTx=8; Npath=100; tap=randi([3 TAP]); ds=Cp; s=N+N-1; N1=Npath*Npath;
N2=Npath*NTx;
for aa=1:Npath
for bb=1:tap
p(aa,bb)=randi([1 ds]);
p(aa,:)=sort(p(aa,:),'descend');
xx(aa,:)=(abs(randn(1,tap)+(randn(1,tap))*1i));
xx(aa,:)=sort(xx(aa,:));
end
end
% Loop for adding random positions & normalized impulse response (h_N)
for cc=1:Npath
for dd=1:tap
h(cc,p(cc,dd))=xx(cc,dd);
U(cc)=sqrt(sum((h(cc,:).^2)));
h_N(cc,:)=h(cc,:)./U(cc);
h_N(cc,:)=circshift(h_N(cc,:),[0 -min(p(cc,:))+1]);
end
end
bk= randi ([0,15],NTx,N);
Dk=C(bk+1);
d=ifft((Dk).*sqrt(N));
tx=[d(:,end-Cp+1:end) d];
* | _for ii=1:Npath
for hh=1:N+Cp
for jj=1:NTx
[Txx(jj,:),zf]=filter(h_N(ii,:),1,tx(jj,:),zf);
Txxx(ii,hh)=sum(Txx(:,hh));
end
end
end_ | *
  댓글 수: 1
Cedric
Cedric 2014년 7월 3일
편집: Cedric 2014년 7월 3일
Your code doesn't work (undefined TAP, flawed calls to RANDI, RANDN, etc). You should use the profiler and identify the bottleneck(s):
profile viewer
and execute your script from there.

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by