summaryrefslogtreecommitdiff
path: root/2084/CH16/EX16.21w/16_21w.sce
blob: c1c9d30a7bd003ac0872a80502f4a3464f564a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//developed in windows XP operating system 32bit
//platform Scilab 5.4.1
clc;clear;
//example 16.21w
//calculation of the original frequency of the source

//given data
u0=10//speed(in m/s) of the observer going away from the source
us=10//speed(in m/s) of the source going away from observer
nudash=1950//frequency(in Hz) of the sound detected by the detector
v=340//speed(in m/s) of the sound in the air

//calculation
nu=((v+us)/(v-u0))*nudash//original frequency

printf('the original frequency of the source is %d Hz',round(nu))