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
You have three gear wheels a, b and c connected to each other,if you turn the first gear wheel "a" clockwise what will happen to
Rina8888 [55]

In the case above,  It will take more time for a tooth of wheel B and C to make a full turn (slower) than it will for a tooth of wheel A.

<h3>What are gear wheels?</h3>

A gear wheel is known to be a kind of a wheel that is known to be made up of a teeth and/or cogs that is known to function with those of other aspect of the wheel or part.

Note that in the above case, lets use a scenario that  Wheel P has 5 teeth. Wheel M has 3 teeth and wheel N has 1 teeth.  If wheel P makes a full turn, wheel M turn will be slower as  well as wheel N which will take more time.

Therefore, In the case above,  It will take more time for a tooth of wheel B and C to make a full turn than it will for a tooth of wheel A.

Learn more about Gear wheels from

brainly.com/question/17080981

#SPJ1

6 0
1 year ago
A flame ionization detector, which is often used in gas chromatography, responds to a change in
Lena [83]

Answer:

Option A

Explanation:

We know that ions are present in hydrogen-air flame and when the burning of an organic compound takes place in this flame more ions are produced in the flame.  

Thus when we apply a voltage across this flame, the ion collector plate attracts the all the ions in the flame.

The presence of organic compounds increases the voltage across the hydrogen ion flame produced at the ion collector increases and as the voltage increases, the detection of the organic compound can be made in turn.

Thus flame ionization detector clearly responds to the variation in the collection of ions or electrons in a flame.

3 0
3 years ago
How frequently should vehicle registration be renewed?
sergeinik [125]

Answer:

When the renewal period comes around (with respect to the license expiry date).

Explanation:

5 0
2 years ago
An AC generator supplies an rms voltage of 120 V at 50.0 Hz. It is connected in series with a 0.650 H inductor, a 4.80 μF capaci
Serggg [28]

Answer:

Explanation:

f = 50.0 Hz, L = 0.650 H, π = 3.14

C = 4.80 μF, R = 301 Ω resistor. V = 120volts

XL = wL = 2πfL

= 2×3.14×50* 0.650

= 204.1 Ohm

Xc= 1/wC

Xc = 1/2πfC

Xc = 1/2×3.14×50×4.80μF

= 1/0.0015072

= 663.48Ohms

1. Total impedance, Z = sqrt (R^2 + (Xc-XL)^2)= √ 301^2+ (663.48Ohms - 204.1 Ohm)^2

√ 90601 + (459.38)^2

√ 90601+211029.98

√ 301630.9844

= 549.209

Z = 549.21Ohms

2. I=V/Z = 120/ 549.21Ohms =0.218Ampere

3. P=V×I = 120* 0.218 = 26.16Watt

Note that

I rms = Vrms/Xc

= 120/663.48Ohms

= 0.18086A

4. I(max) = I(rms) × √2

= 0.18086A × 1.4142

= 0.2557

= 0.256A

5. V=I(max) * XL

= 0.256A ×204.1

=52.2496

= 52.250volts

6. V=I(max) × Xc

= 0.256A × 663.48Ohms

= 169.85volts

7. Xc=XL

1/2πfC = 2πfL

1/2πfC = 2πf× 0.650

1/2×3.14×f×4.80μF = 2×3.14×f×0.650

1/6.28×f×4.8×10^-6 = 4.082f

1/0.000030144× f = 4.082×f

1 = 0.000030144×f×4.082×f

1 = 0.000123f^2

f^2 = 1/0.000123048

f^2 = 8126.922

f =√8126.922

f = 90.14 Hz

8 0
3 years ago
Products that are in the process of being manufactured but are not yet complete are called:
vazorg [7]

Answer:

Those products are generally called Work in Process WIP

Explanation:

Work in process (WIP), or work in progress (WIP), goods in process, or in-process inventory in a manufacturing industry/company refer to the company's partially finished goods waiting for completion and eventual sale or the value of these items.

These items are either just being produced or require further processing (like purification, separation, packaging or handling) in a queue or a buffer storage.

6 0
3 years ago
Other questions:
  • A shaft is made of an aluminum alloy having an allowable shear stress of τallow = 100 MPa. If the diameter of the shaft is 100 m
    13·2 answers
  • The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-deta
    7·1 answer
  • Complete the following sentence. Engineers explore biology, chemistry, and physics for use in scenarios.
    8·2 answers
  • If a toy car covers a distance of 42m in 7sec, what is it’s speed
    9·2 answers
  • Problem: design the following rectangular floor beam for a building.
    15·2 answers
  • Lets try to get to 100 sub before charismas day <br> Jordan Gracia 32 sub and 5 videos
    13·2 answers
  • Which of the following devices is a simple machine?
    11·2 answers
  • “In a trusting relationship, confidential information is kept confidential.” Explain what the limits to confidentiality are and
    14·1 answer
  • For the floor plan shown, if a = sm b= 8m, specify type of Load on Beam AHS<br> D<br> B В
    10·1 answer
  • The three construction crafts that require a MINIMUM of a 4-year college degree are
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!