what is the matlab code for ploting dispersion against wavelength (for chromatic dispersion)?
24 views (last 30 days)
Show older comments
Ahmed on 27 Dec 2022
Commented: Star Strider on 29 Dec 2022
Star Strider on 28 Dec 2022
More Answers (1)
Hiro Yoshino on 28 Dec 2022
You can use gradient to calculate this problem numerically.
Let me use SiO2 as an example.
data = readtable("SiO2.txt");
lambda = data.Wavelength_nm_;
n = data.n;
c = 3e8;
Here is how to visualize D for you:
dn_dlambda = gradient(n,5); % 1st order
d2n_dlambda2 = gradient(dn_dlambda,5); % 2nd order
D = -lambda/c.*d2n_dlambda2; % your D
Find more on Error Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!