blob: 6a53cce94c713db1e9ac9720cd03d484a034c739 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//Velocity of light in diamond
clear;
clc;
printf("\tExample 21.2\n");
er=5.5; //Relative permitivity
xm=-2.17D-5; //Magnetic Suseptibility
eo=8.85D-12; //Permitivity in free space
uo=4*%pi*10^-7; //Permeability
e=er*eo;
u=uo*(1+xm);
v=1/sqrt(u*e);
printf("\nVelocity in diamond is %.2e m/s\n",v);
//End
|