function [y]=N_num(datp,ss) r3=1; r4=1; r2=0.01; phi=0*pi/2; omegac0=0.1; omegac1=0.005; omegap=0.01; omegan=0.01; omegam=3; w43=0; w21=0; datm=0; datc=w43+datp-w21; datn=datp+datm-datc; x0=0:0.001:1 i0=1; for xx=0:0.0001:1 alp1=2*pi*(xx); omegac=omegac0+omegac1*sin(alp1); r21=r2+1i*datn; r31=r3+1i*datp; r41=r4+1i*(datm+datp); p31=1i*omegap*(r21*r41+omegac*conj(omegac))/(r31*(r21*r41+omegac*conj(omegac))+r21*omegam*conj(omegam))+... -1i*omegac*omegan*omegam*exp(1i*phi)/(r31*(r21*r41+omegac*conj(omegac))+r21*omegam*conj(omegam)); rho=p31/omegap; ip3=imag(rho); rp3=real(rho); aa=10; mm=5; rr=4; tri=exp(-aa*ip3);%amplitude trr=exp(1i*aa*rp3);%phase tr3(i0)=tri*trr*exp(-1i*2*pi*xx*ss*rr); i0=i0+1; end ops3=trapz(x0,tr3); ips3=ops3*conj(ops3)*sin(mm*pi*ss*rr)*sin(mm*pi*ss*rr)/(mm*mm*sin(pi*ss*rr)*sin(pi*ss*rr)); y=ips3; end |