summaryrefslogtreecommitdiff
path: root/2309/CH1/EX1.a.3/A_Ex1_3.sce
blob: a0ae9fbc683585b7aa0c8c77860af6a869a50cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Chapter 1 addl_Example 3 
//==============================================================================
clc;
clear;

//input data

v       = 1440;         // velocity of ultrasonics in  sea water in m/s
t       = 0.33          // time taken b/w tx and rx in sec

//Calculations

d       = v*t;          // distance travelled by ultrasonics
D       = d/2;          // depth of submerged submarine in m

//output
mprintf('Depth of submerged submarine = %3.1f m',D);

//==============================================================================