summaryrefslogtreecommitdiff
path: root/3739/CH7/EX7.1/EX7_1.sce
blob: f2116e4e48e91b64a5e90a98e5c0fbeb2801459c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Chapter 7, Example 7.1, page 293
clc

//Initialisation
h=200                                //height in m
d=30*10**3                           //distance in km
R=40*10**-6                           //height in km
pi=3.14

//Calculation
phi=atan(h*d**-1)               //in radian
phi1=phi*180/pi                 //in degree
n=cos(phi1)
r=round(n)/R                         //radius

//Results
printf("Radius = %.1f km",r)