1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alinara [238K]
3 years ago
10

HW6P2 (20 points) The recorded daily temperature (°F) in New York City and in Denver, Colorado during the month of January 2014

is given by the data file NYCDen Jan 14.dat (data from the U.S. National Oceanic and Atmospheric Administration). The first column is the day of the month 2ad column is NYC temperatures and 3 column is Denver temperature. Write a MATLAB program in a script file HW6P2.m that does the following: a) (1 pt) Imports the data file NYCDen Jan14.dat b) (2 pts) Assigns the columns of NYCDen Jan 14 to variables DAY, T.NYC and T_DEN, respectively c) (3 pts) Determines the average temperature for the month of January 2014 in each city (rounded to the nearest degree). You can use the mean() built-in MATLAB function to calculate the average. Your display must be in the format "The average temperature in sss for Jan. 2014 is XX *P." Where sss refers to the name of the city and xx refers to the temperature value. This text must be displayed for each city d) (3 pts) Determines and displays the number of days where the temperat was above the average of that city. Your display must be in the format "The temperature in Sss was above the average for xx days. This text must be displayed for each city refers to the number of days while sss refers to the city 0) (3 pts) Determines and displays the number of days where the temperature in each city was above the average of NYC but below the average of DEN. Your display must be in the format "The temperature in SSS was above NYC average and below DEN average for Xx days. This text must be displayed for each city. refers to the number of days while sss refers to the city. (3 pts) Determines and displays the number of days where the temperature in each city was above either the average of NYC or the average of DEN. Your display must be in the format "The temperature in SSS was above either NYC average or DEN average for xx days. This text must be displayed for each city, OK refers to the number of days while sss refers to the city. 8) (5 pts) Determines and displays the days that the temperature in Denver was lower than the temperature in New York city and the temperature difference for these days. Your display must be repeated for all days in the format: On Jan. xx 2014, DEN temp. was lower than NYC temp. by Xx . XX refers to the day or the value of the temperature difference. Use fprintf() with 1 format character to display Xox data with a field width of 2. Do Not define a field width for SSS strings. Leave a blank line between every data set (cd. e. f and g) displayed in the command window.

Engineering
1 answer:
Maurinko [17]3 years ago
8 0

Answer & Explanation:

function Temprature

NYC=[33 33 18 29 40 55 19 22 32 37 58 54 51 52 45 41 45 39 36 45 33 18 19 19 28 34 44 21 23 30 39];

DEN=[39 48 61 39 14 37 43 38 46 39 55 46 46 39 54 45 52 52 62 45 62 40 25 57 60 57 20 32 50 48 28];

%AVERAGE CALCULATION AND ROUND TO NEAREST INT

avgNYC=round(mean(NYC));

avgDEN=round(mean(DEN));

fprintf('\nThe average temperature for the month of January in New York city is %g (F)',avgNYC);

fprintf('\nThe average temperature for the month of January in Denvar is %g (F)',avgDEN);

%part B

count=1;

NNYC=0;

NDEN=0;

while count<=length(NYC)

   if NYC(count)>avgNYC

       NNYC=NNYC+1;

   end

   if DEN(count)>avgDEN

        NDEN=NDEN+1;

   end

   count=count+1;

end

fprintf('\nDuring %g days, the temprature in New York city was above the average',NNYC);

fprintf('\nDuring %g days, the temprature in Denvar was above the average',NDEN);

%part C

count=1;

highDen=0;

while count<=length(NYC)

   if NYC(count)>DEN(count)

       highDen=highDen+1;

   end

   count=count+1;

end

fprintf('\nDuring %g days, the temprature in Denver was higher than the temprature in New York city.\n',highDen);

end

%output

check the attachment for additional Information

You might be interested in
A reversible process and an irreversible process both have the same________ between the same two states. a. Internal energy b. W
Vlad1618 [11]

Answer:

a) Internal energy

Explanation:

As we know that internal energy is a point function so it did not depends on the path ,it depends  at the initial and final states of process.All point function property did not depends on the path.Internal energy is a exact function.

Work and heat is a path function so these depend on the path.They have different values for different path between two states.Work and heat are in exact function.

We know that in ir-reversible process entropy will increase so entropy will be different for reversible and ir-reversible processes.

5 0
3 years ago
Design a ductile iron pumping main carrying a discharge of 0.35 m3/s over a distance of 4 km. The elevation of the pumping stati
snow_tiger [21]

Answer:

D=0.41m

Explanation:

From the question we are told that:

Discharge rate V_r=0.35 m3/s

Distance d=4km

Elevation of the pumping station h_p= 140 m

Elevation of the Exit point h_e= 150 m

Generally the Steady Flow Energy Equation SFEE is mathematically given by

h_p=h_e+h

With

P_1-P_2

And

V_1=V-2

Therefore

h=140-150

h=10

Generally h is give as

h=\frac{0.5LV^2}{2gD}

h=\frac{8Q^2fL}{\pi^2 gD^5}

Therefore

10=\frac{8Q^2fL}{\pi^2 gD^5}

D=^5\frac{8*(0.35)^2*0.003*4000}{3.142^2*9.81*10}

D=0.41m

8 0
3 years ago
Sandwich materials typically use a high density core with non-structural cover plates. a)True b)- False
Lorico [155]

Answer: False

Explanation: Sandwich materials are usually in composite material form which has a fabrication of two thin layers which are stiff in nature and have  light weighing and thick core .The construction is based on the ratio that is of stiffness to the weight .Therefore, the density of the material in the core is not high and are only connected with the skin layer through adhesive .So the given statement is false that sandwich materials typically use a high density core with non- structural cover plates.

4 0
3 years ago
A microwave transmitter has an output of 0.1W at 2 GHz. Assume that this transmitter is used in a microwave communication system
Len [333]

Answer:

gain = 353.3616

P_r = 1.742*10^-8 W

Explanation:

Given:

- The output Power P_o = 0.1 W

- The diameter of the antennas d = 1.2 m

- The frequency of signal f = 2 GHz

Find:

a. What is the gain of each antenna?

b. If the receiving antenna is located 24 km from the transmitting antenna over a free space path, find the available signal power out of the receiving antenna.

Solution:

- The gain of the parabolic antenna is given by the following formula:

                            gain = 0.56 * 4 * pi^2 * r^2 / λ^2

Where, λ : The wavelength of signal

            r: Radius of antenna = d / 2 = 1.2 / 2 = 0.6 m

- The wavelength can be determined by:

                            λ = c / f

                            λ = (3*10^8) / (2*10^9)

                            λ = 0.15 m

- Plug in the values in the gain formula:

                            gain = 0.56 * 4 * pi^2 * 0.6^2 / 0.15^2

                            gain = 353.3616

- The available signal power out from the receiving antenna is:

                            P_r = (gain^2 * λ^2 * W) / (16*pi^2 * 10^2 * 10^6)

                            P_r = (353.36^2 * 0.15^2 * 0.1) / (16*pi^2 * 10^2 * 10^6)

                            P_r = 1.742*10^-8 W

4 0
3 years ago
Is it better to do blue prints with paper and pencil or a computer program if you’re going to design a house? Why?
Hatshy [7]

Answer:

Computer program

Explanation:

I use Revit and its way better to do all that you can see 2D 3D the measurements and its super easy to use hope this helps

6 0
3 years ago
Other questions:
  • Calculate how large a mass would be necessary to obtain a mechanical noise limit of [Equation] = 1 nG, 1 µG, and 1 mG if the mec
    9·1 answer
  • What is the value of the energy (in Joules) stored by the mobile phone battery (capacity of 1.8 Ah), if it is rated at 3.7 V
    15·2 answers
  • What are the 2 reasons an alignment should be done?
    13·1 answer
  • Storing parts outside doesn't cause any environmental risks as long as the items are covered.
    12·2 answers
  • Prelest! Introduction to Engineering and Technology 1 Select the correct answer. What technological invention allowed for the pr
    5·1 answer
  • Does anyone know obamas last name???? please help its for a friend I swear!!!111!!11!
    8·1 answer
  • When removing a diesel engine from a truck, Technician A says it is OK to disconnect an air con­ditioning hose, but the refriger
    8·1 answer
  • Technician A that shielding gas nozzles may have different shapes. Technician B says that gelding gas nozzles is attached to the
    8·1 answer
  • Write a paragraph on computer 473
    5·1 answer
  • compressors, the gas is often cooled while being compressed to reduce the power consumed by the compressor. explain how cooling
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!