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
Which investigative process is most helpful for learning about past societies?
tatuchka [14]

Answer: think it A

Explanation: makes

6 0
3 years ago
A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the mot
Thepotemich [5.8K]

78950W the answer

Explanation:

A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the motor efficiency excluding field and stator losses, is 95%and X=2.5ohms. calculate the mechanical power developed, the Armature current, back e.m.f, power angle and maximum or pull out torque of the motor

A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the motor efficiency excluding field and stator losses, is 95%and X=2.5ohms. calculate the mechanical power developed, the Armature current, back e.m.f, power angle and maximum or pull out torque of the motor

5 0
3 years ago
A cylindrical metal specimen having an original diameter of 12.8 mm and gauge length of 50.80 mm is pulled in tension until frac
Sedaia [141]

Answer:

%Reduction in area = 73.41%

%Reduction in elongation = 42.20%

Explanation:

Given

Original diameter = 12.8 mm

Gauge length = 50.80mm

Diameter at the point of fracture = 6.60 mm (0.260 in.)

Fractured gauge length = 72.14 mm.

%Reduction in Area is given as:

((do/2)² - (d1/2)²)/(do/2)²

Calculating percent reduction in area

do = 12.8mm, d1 = 6.6mm

So,

%RA = ((12.8/2)² - 6.6/2)²)/(12.8/2)²

%RA = 0.734130859375

%RA = 73.41%

Calculating percent reduction in elongation

%Reduction in elongation is given as:

((do) - (d1))/(d1)

do = 72.14mm, d1 = 50.80mm

So,

%RA = ((72.24) - (50.80))/(50.80)

%RA = 0.422047244094488

%RA = 42.20%

3 0
3 years ago
The mechanical energy of an object is a combination of its potential energy and its
saveliy_v [14]

The mechanical energy of an object is a combination of its potential energy and its <em><u>kinetic</u></em><em><u> </u></em><em><u>energy</u></em><em><u>.</u></em>

6 0
2 years ago
In order to test the reverse route back towards the original host, which of the following will you use? A Standard ping B Extend
Vlad1618 [11]

The function that you will use in order to test the reverse route back toward the original host is known as Extended ping. Thus, the correct option for this question is B.

<h3>What is Ping and traceroute for?</h3>

Ping and traceroute are the common commands you can effectively utilize in order to troubleshoot network problems. Ping is a simple command that can typically test the reachability of a device on the network. While traceroute is a command you use to 'trace' the route that a packet takes when traveling to its destination.

Extended ping permits a router's ping command to use The router's LAN IP address from within the subnet, fully testing the route back to the subnet. A standard ping often does not test the reverse route that you need to back toward the original host.

Therefore, the function that you will use in order to test the reverse route back toward the original host is known as Extended ping. Thus, the correct option for this question is B.

To learn more about Ping and traceroute, refer to the link:

brainly.com/question/28333920

#SPJ1

6 0
1 year ago
Other questions:
  • The nameplate on a 70 kVA transformer shows a primary voltage of 480 volts and a secondary voltage of 115 volts. We wish to dete
    10·1 answer
  • A common rule of thumb for controller discretization is to have "6 samples per rise time" in order to achieve a reasonable appro
    9·1 answer
  • 4. What are the basic scientific principles the engineers who designed the digital scales would have needed to understand to des
    5·1 answer
  • The price of a single item within a group of items is
    8·1 answer
  • Problem 3.10 One/half million parts of a certain type are to be manufactured annually on dedicated production machines that run
    7·2 answers
  • Draw the six principal views of
    13·1 answer
  • Technician A states that air tools generally produce more noise than electric tools, so wear ear protection when using air tools
    8·1 answer
  • Technician A says that to depressurize high-pressure components of the electronic brake control (EBC) system, research the proce
    13·1 answer
  • (a) A non-cold-worked 1040 steel cylindrical rod has an initial length of 100 mm and initial diameter of 7.50 mm. is to be defor
    7·1 answer
  • 1. Explain the term engine<br>compression​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!