# Given below is the code for a radiated electric field as a function of time. I need to take its Fourier transform.

1 visualizzazione (ultimi 30 giorni)
Jasmine il 4 Gen 2023
clc;clear all;
tau=35*10^-15
mu=200*(10^(-4))
E_b=30
e0=8.854*(10^(-12))
pi=3.14
w0=20*10^-6
A=pi*(w0^(2))
lambda=800*10^-9
c=3*10^8
I0=1.59*(10^20)
t=linspace(-0.3*10^-12,0.3*10^-12,500)
I=I0*exp(-((t./tau).^2))
plot(t,I)
xlabel('time(ps)');
ylabel('I(t)');
e=1.602*10^-19;
eta=377;
F_opt=10
F_opt_2=1.3
F_opt_3=1.0
b=5*10^-6;
n=3.94;
m=200*(10^(-4));
E_b=30;
pi=3.14;
R=0.359
c=3*10^8;
I0=1.59*(10^20)
h=6.626*10^-34;
h_cross=h./(2*(pi));
w=2.3561*10^15;
E_p=h_cross*w
r=20*10^-6;
A=pi*(r^(2))
B=(A.*e.*(1-R).*m)./(4.*pi.*e0.*c.^(-2).*b.*h_cross.*w.*sqrt(pi))
D=(eta.*e.*(1-R).*m)./((n+1).*h_cross.*w.*sqrt(pi))
syms x
f_1=tau.*exp(-x.^(2));
t=linspace(-0.3*10^-12,0.3*10^-12,500);
fun=matlabFunction(f_1,'Vars',x)
for k = 1:length(t)
z_1(k)=integral(fun,-Inf,(t(k)/tau),'ArrayValued',true);
end
plot(t,Q)
xlabel('time(ps)');
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Christopher McCausland il 4 Gen 2023
Hi Jasmine,
You can use the inbuilt fft() function. Documentation is here.
Christopher
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Fast Fourier Transforms in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by