i dont know why the second figure is empty
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
fs=20;
Ts=1/fs;
N=1024
Tmax=(N-1)*Ts;
t=-10:Ts:10;
ut=exp(-(t/10).^2);
plot(t,ut.^2)
f=-5:fs:5;
z=fftshift(fft(ut));
plot(f,abs(z))
댓글 수: 0
답변 (1개)
  Azzi Abdelmalek
      
      
 2013년 11월 30일
        
      편집: Azzi Abdelmalek
      
      
 2013년 11월 30일
  
      Figure 1 was erased by figure 2
fs=20;
Ts=1/fs;
N=1024
Tmax=(N-1)*Ts;
t=-10:Ts:10;
ut=exp(-(t/10).^2);
%-----figure 1--------------
plot(t,ut.^2)
% -----figure 2------------
figure
z=fftshift(fft(ut));
plot(abs(z))
Check this
 f=-5:fs:5
참고 항목
카테고리
				Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!