필터 지우기
필터 지우기

i tried to fix the problem i didnt know how :( please help

조회 수: 4 (최근 30일)
abed
abed 2013년 12월 4일
편집: Friedrich 2013년 12월 4일
clear all;
distance=15;
beta2=1;
N=1;
mshape=input('m=0 for seech, m>0 for super-gaussian= ');
chirp0=0;
nt=1024;tmax=32;
stepnum=round(20*distance*N.^2);
deltaz=distance/stepnum;
dtau=(2*tmax)/nt;
tau=(-nt/2:nt/2-1)*dtau;
omega=(pi/tmax)*(0:nt/2-1) (-nt/2:-1);
if mshape==0
uu=sech(tau).*exp(-0.5i*chirp0*tau.^2);
else
uu=exp(-0.5*(1+1i*chirp0).*tau.^(2*mshape));
end
%%%%%
temp=fftshift(ifft(uu)).*(nt*dtau)/sqrt(2*pi);
figure;
subplot(2,1,1);
plot(tau,abs(uu).^2,'--k');hold on;
axis([-5 5 0 inf]);
xlabel('time');
ylabel('power');
title('input and output pulse shape and spectrum');
subplot(2,1,2);
plot(fftshift(omega)/(2*pi),abs(temp).^2,'--k');hold on;
axis([-.5 .5 0 inf]);
xlabel('frequency');
ylabel('power');
%%%%%
dispersion=exp(0.5*1i*beta2*omega.^2*delta2);
hhz=1i*N^2*deltaz;
%%%%%
temp=uu.*exp(abs(uu).^2.*hhz/2);
for n=1:stepnum
ftemp=ifft(temp).*dispersion;
uu=fft(f_temp);
temp=uu.*exp(abs(uu).^2.*hhz);
end
uu=temp.*exp(-abs(uu).^2.*hhz);
temp=fftshift(ifft(uu)).*(nt*dtau)/sqrt(2*pi);
subplot(2,1,1)
plot(tau,abs(uu).^2,'-k')
subplot(2,1,2)
plot(fftshift(omega)/(2*pi),abs(temp).^2,'-k')
  댓글 수: 2
Andreas Goser
Andreas Goser 2013년 12월 4일
What's the problem?
dpb
dpb 2013년 12월 4일
And format the code--insert a couple of blanks before the first line of code and observe the preview window...if it isn't legible yet, read the Help...

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

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by