신호처리 | 고속 콘벌루션 |
페이지 정보
작성자 cemtool 작성일14-04-23 15:43 조회13,116회 댓글0건본문
급속 콘벌루션의 효율성을 보여주기 위해 두 접근 방법의 실행 시간을 비교해보자.
- ex5_23.cem
% Chapter 05: Example 5.22 High speed convolution %conv_time = zeros(1,150); fft_time = zeros(1,150); %for(N=1;N<=150;N++){ tc = 0; tf=0; L = 2*N-1; nu = round((log10(L)/log10(2))+0.45); L = 2^nu; for(I=1;I<=100;I++){ h = randn(1,N); x = rand(1,N); t0 = clock; y1 = conv(h,x); t1=etime(clock,t0); tc = tc+t1; t0 = clock; y2 = ifft(fft(h,L).*fft(x,L)); t2=etime(clock,t0); tf = tf+t2; } % conv_time(N)=tc/100; fft_time(N)=tf/100; } %n = 1:150; subplot(1,1,1); plot(n(25:150),conv_time(25:150),n(25:150),fft_time(25:150)) save times.txt conv_time fft_time -ascii -tabs
댓글목록
등록된 댓글이 없습니다.