blob: 7c4843e7ba0648cf08d920a6c5ceb94e2048cd1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Example 7.2.1 page 7.11
clc;
clear;
n1=3.4; //refractive index of optical source
n=1.46; //refractive index of silica fiber
r=((n1-n)/(n1+n))^2; //computing Frensel reflection
L=-10*log10(1-r); //computing loss
printf("\nFrensel reflection is %.3f.\nPower loss is %.2f dB.",r,L);
|