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 cylindrical specimen of a hypothetical metal alloy is stressed in compression. If its original and final diameters are 30.00 a
IrinaVladis [17]

Answer:

The original length of the specimen l_{o} = 104.7 mm

Explanation:

Original diameter d_{o} = 30 mm

Final diameter d_{1} = 30.04 mm

Change in diameter Δd = 0.04 mm

Final length l_{1} = 105.20 mm

Elastic modulus E = 65.5 G pa = 65.5 × 10^{3} M pa

Shear modulus G = 25.4 G pa = 25.4 × 10^{3} M pa

We know that the relation between the shear modulus & elastic modulus is given by

G = \frac{E}{2(1 + \mu)}

25.5 = \frac{65.5}{2 (1 + \mu)}

\mu = 0.28

This is the value of possion's ratio.

We know that the possion's ratio is given by

\mu = \frac{\frac{0.04}{30} }{\frac{change \ in \ length}{l_{o} } }

{\frac{change \ in \ length}{l_{o} } = \frac{\frac{0.04}{30} }{0.28}

{\frac{change \ in \ length}{l_{o} } = 0.00476

\frac{l_{1} - l_{o}  }{l_{o}  } = 0.00476

\frac{l_{1} }{l_{o} } = 1.00476

Final length l_{o} = 105.2 m

Original length

l_{o} = \frac{105.2}{1.00476}

l_{o} = 104.7 mm

This is the original length of the specimen.

5 0
3 years ago
(Practice work, not graded)
luda_lava [24]

Answer: ALL CAREFULLY ANSWERED CORRECTLY.

Explanation:

1) A loaf of Bread PHYSICAL SYSTEM

✓ How can the environment affect the edibility of the bread

✓ What are the constituents that makes up the bread

✓ What process is involved in these constituents mixing to form the loaf.

2) The law of thermodynamics makes us to understand that when heat/energy passes through a system, the systems internal energy changes with respect to the conservation of energy law. That is energy lost = energy gained. Typically, ice would melt in a cup of hot tea because of the thermal energy in the molecules of the hot tea. When you heat a material, you are adding thermal kinetic energy to its molecules and usually raising its temperature. The temperature of the ice raises due to the kinetic energy added to it and it melts to water.

3) The theory of systems view the world as a complex system of interconnected parts. If we consider the society; (financial systems, political systems, etc) we will agree that they individually have their own components and it's the summation of this components that makes the system, this implies that system thinking could be applicable in this kinda of systems as long as they are made up of components.

4) Technology has boosted every sector of our lives and it has the capacity to do more. Restricting it's importance to entertainment alone would be an underusing of its potentials. Engineering students infact should not need any drive to be encouraged about maximizing all it can do in shaping our world.

5) ~ Nature shows its splendid soul

~Never ceases to leave us in amazement

~And we are in love

7 0
3 years ago
A block of ice weighing 20 lb is taken from the freezer where it was stored at -15"F. How many Btu of heat will be required to c
Rus_ich [418]

Answer:

Heat required =7126.58 Btu.

Explanation:

Given that

Mass m=20 lb

We know that

1 lb =0.45 kg

So 20 lb=9 kg

m=9 kg

Ice at -15° F and we have to covert it at 200° F.

First ice will take sensible heat at up to 32 F then it will take latent heat at constant temperature and temperature will remain 32 F.After that it will convert in water and water will take sensible heat and reach at 200 F.

We know that

Specific heat for ice C_p=2.03\ KJ/kg.K

Latent heat for ice H=336 KJ/kg

Specific heat for ice C_p=4.187\ KJ/kg.K

We know that sensible heat given as

Q=mC_p\Delta T

Heat for -15F to 32 F:

Q=mC_p\Delta T

Q=9\times 2.03(32+15) KJ

Q=858.69 KJ

Heat for 32 Fto 200 F:

Q=mC_p\Delta T

Q=9\times 4.187(200-32) KJ

Q=6330.74 KJ

Total heat=858.69 + 336 +6330.74 KJ

Total heat=7525.43 KJ

We know that 1 KJ=0.947 Btu

So   7525.43 KJ=7126.58 Btu

So heat required to covert ice into water is 7126.58 Btu.

8 0
3 years ago
3.
Andreyy89

Answer:

7

Explanation:

5 + 2 = 7

4 0
2 years ago
A rigid insulated tank is divided into 2 equal compartments by a thin rigid partition. One of the compartments contains air, ass
Illusion [34]
Https://www.slader.com/discussion/question/an-insulated-rigid-tank-is-divided-into-two-equal-parts-by-a-partition-initially-one-part-contains-4/



there will be the answer

6 0
2 years ago
Other questions:
  • A 3-phase induction motor with 4 poles is being driven at 45 Hz and is running in its normal operating range. When connected to
    12·1 answer
  • A certain working substance receives 100 Btu reversibly as heat at a temperature of 1000℉ from an energy source at 3600°R. Refer
    13·1 answer
  • Give an example of how the fields of science, technology, and mathematics are commonly used when building a highway.
    7·1 answer
  • A thick oak wall (rho = 545 kg/m3 , Cp = 2385 J/kgK, and k = 0.17 W/mK) initially at 25°C is suddenly exposed to combustion prod
    11·1 answer
  • A Barnes and Books is interested in purchasing a two-story building for a new
    5·1 answer
  • 1. Which of the following is the ideal way to apply pressure onto pedals?
    14·2 answers
  • i need jacket for my daughter who will be going on a girls scouts camping trip it cannot be bulky because she is limited to one
    8·2 answers
  • Technician a says that diesel engines can produce more power because air in fuel or not mix during the intake stroke. Technician
    9·1 answer
  • U Differentiate between rotation and revolution<br>of earth.​
    6·2 answers
  • The stagnation chamber of a wind tunnel is connected to a high-pressure airbottle farm which is outside the laboratory building.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!