I need help with the fiber function
古いコメントを表示
Hello, I am trying to use the fiber optic function, to model a sinusoidal signal (and not a Gaussian pulse, as is usually done) I am doing it to try to understand the concept of electronic compensation. I need you to graph the two signals for me, (obviously one smaller than the other) but when I execute my code, the signal that Hd returns, only appears in the positive part and not in the negative part.
this is what i should throw:

and this is what it throws at me:

this is the code
A =2; %Amplitud
f = 100; %Frecuencia fundamental
Tb=1/f;
n_bits=4;
w=2*pi*1/Tb; %Frecuencia angular
Fs=64/Tb; %Frecuencia de Muestreo
Ts=1/Fs; %Tiempo de bit
Nmpb=(Tb/Ts)+1; %Número de muestras por bit
Nmps=Nmpb*n_bits; %Número de muestras de toda la secuencia
b2 = -21.6*(1e-12^2)/1e3;
b3 = 0.117*(1e-12^3)/1e3;
Dz = 10e3;
t=0:Ts:(Nmps-1)*Ts;
x=A*sin(2*pi*f*t);
x1=x+2; %GENERA SEÑAL
Hd=exp(j*0.5*b2*Dz*w.*w-j*b3*w.*w.*w*Dz/6);
AouF=fftshift(fft(x1)).*Hd;
Aou=ifft(fftshift(AouF));
plot(t,x,'b',t,abs(Aou),'g')
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spectral Measurements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!