summaryrefslogtreecommitdiff
path: root/884/CH7/EX7.2/Example7_2.sce
blob: 6de8255685fa8e3126cf9f9db22b041a58c2da4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//calculation of frequency of a wave

clear;
clc;

printf("\t Example 7.2\n");

lambda=522*10^-9;//wavelength, m
c=3*10^8;//speed of light in vacuum, m/s
v=c/lambda;//frequency, Hz

printf("\t the frequency of the wave is : %4.2f *10^14 Hz\n",v*10^-14);

//End