Professional Documents
Culture Documents
Week4 HWrevised
Week4 HWrevised
week4
Global temperature changes have resulted in new pa:erns of storms in many
parts of the world. Tracking wind speeds and a variety of categories of
storms is important in understanding the ramica@ons of these temperature
varia@ons.
1. Whether a storm is a tropical depression, tropical storm, or hurricane is
determined by the average sustained wind speed. Write a script called
StormType that will prompt the user for the wind speed of the storm,
and will print which type of storm it is.
TROPICAL SYSTEMS
WIND SPEEDS FOR
Table. 1
TROPICAL DEPRESSION
TROPICAL STORM
HURRICANE (category 1)
HURRICANE (category 2)
HURRICANE (category 3)
HURRICANE (category 4)
HURRICANE (category 5)
2.
3.
Write the func@on called fn_speedconv which converts the wind speed
from mph to Knots or km/h.
1 Knots = 1.152 mph
1 mph = 1.609 km/h
The Beaufort Wind Scale (see table. 2)is used to characterize the strength
of winds. The scale uses integer values and goes from a force of 0, which
is no wind, up to 12, which is a hurricane.
Write the script called BeaufortWindScale which convert the wind speed
from mph to Knots (and km/h) and prints a message regarding what type
of wind that Beaufort Wind Scale Force represents by using either if-elseif
or switch statement. Display the wind speed in Knots and km/h also.
4. Run the script StormType and nd the type of storm when the wind speed
is 65 mph.
5. Run the script BeaufortWindScale and nd the class of the wind when the
wind speed is 65 mph.
Submit : StormType.m, BeaufortWindScale.m, fn_speedconv.m and
Command Window history of 4 and 5 in diary (.txt)
Table. 2
Beaufort Wind
Scale Force
Wind
(Knots)
ClassicaGon
Calm
1 - 3
Light Air
4 - 6
Light Breeze
7 - 10
Gentle Breeze
11 - 16
Moderate Breeze
17 - 21
Fresh Breeze
22 - 27
Strong Breeze
28 - 33
Near Gale
24 - 40
Gale
41 - 47
Strong Gale
10
48 - 55
Storm
11
56 - 63
Violent Storm
12
64 +
Hurricane