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 rectangular steel bar, with 8" x 0.75" cross-sectional dimensions, has equal and opposite moments applied to its ends.
denpristay [2]

Answer:

Part a: The yield moment is 400 k.in.

Part b: The strain is 8.621 \times 10^{-4} in/in

Part c: The plastic moment is 600 ksi.

Explanation:

Part a:

As per bending equation

\frac{M}{I}=\frac{F}{y}

Here

  • M is the moment which is to be calculated
  • I is the moment of inertia given as

                         I=\frac{bd^3}{12}

Here

  • b is the breath given as 0.75"
  • d is the depth which is given as 8"

                     I=\frac{bd^3}{12}\\I=\frac{0.75\times 8^3}{12}\\I=32 in^4

  • y is given as

                     y=\frac{d}{2}\\y=\frac{8}{2}\\y=4"\\

  • Force is 50 ksi

\frac{M_y}{I}=\frac{F_y}{y}\\M_y=\frac{F_y}{y}{I}\\M_y=\frac{50}{4}{32}\\M_y=400 k. in

The yield moment is 400 k.in.

Part b:

The strain is given as

Strain=\frac{Stress}{Elastic Modulus}

The stress at the station 2" down from the top is estimated by ratio of triangles as

                        F_{2"}=\frac{F_y}{y}\times 2"\\F_{2"}=\frac{50 ksi}{4"}\times 2"\\F_{2"}=25 ksi

Now the steel has the elastic modulus of E=29000 ksi

Strain=\frac{Stress}{Elastic Modulus}\\Strain=\frac{F_{2"}}{E}\\Strain=\frac{25}{29000}\\Strain=8.621 \times 10^{-4} in/in

So the strain is 8.621 \times 10^{-4} in/in

Part c:

For a rectangular shape the shape factor is given as 1.5.

Now the plastic moment is given as

shape\, factor=\frac{Plastic\, Moment}{Yield\, Moment}\\{Plastic\, Moment}=shape\, factor\times {Yield\, Moment}\\{Plastic\, Moment}=1.5\times400 ksi\\{Plastic\, Moment}=600 ksi

The plastic moment is 600 ksi.

3 0
3 years ago
A polyethylene rod exactly 10 inches long with a cross-sectional area of 0.04 in2 is used to suspend a weight of 358 lbs-f (poun
Nadya [2.5K]

Answer:

Final length of the rod = 13.90 in

Explanation:

Cross Sectional Area of the polythene rod, A = 0.04 in²

Original length of the polythene rod, l = 10 inches

Tensile modulus for the polymer, E = 25,000 psi

Viscosity, \eta = 1*10^{9} psi -sec

Weight = 358 lbs - f

time, t = 1 hr = 3600 sec

Stress is given by:

\sigma = \frac{Force}{Area} \\\sigma = \frac{358}{0.04} \\\sigma = 8950 psi

Based on Maxwell's equation, the strain is given by:

strain = \sigma ( \frac{1}{E} + \frac{t}{\eta} )\\Strain = 8950 ( \frac{1}{25000} + \frac{3600}{10^{9} } )\\Strain = 0.39022

Strain = Extension/(original Length)

0.39022 = Extension/10

Extension = 0.39022 * 10

Extension = 3.9022 in

Extension = Final length - Original length

3.9022 =  Final length - 10

Final length = 10 + 3.9022

Final length = 13.9022 in

Final length = 13.90 in

7 0
3 years ago
What colour is best for radiative heat transfer? a. Black b. Brown c. Blue d. White
GarryVolchara [31]

Answer:

The correct answer is option 'a': Black

Explanation:

As we know that for an object which is black in color it absorbs all the electromagnetic radiation's that are incident on it. Thus if we need to transfer energy to an object by radiation the most suitable color for the process  is black.

In contrast to black color white color is an excellent reflector, reflecting all the incident radiation that may be incident on it hence is the least suitable material for radiative heat transfer.

8 0
3 years ago
Many experts consider Coding a language?<br><br> true or false
VladimirAG [237]

Answer:

True

Explanation:

Coding is a language because it takes time and practice to learn and do it. If you don't practice it, you could put the wrong thing into code and have everything go bonkers.

Hope this helps!! :)

6 0
2 years ago
Read 2 more answers
A designer chooses a font size and color for a web page. What language was most likely to have been used?
Katarina [22]

The language was most likely to have been used is HTML as it help the designer to choose a font size and color for a web page.

<h3>What is HTML a programming language? </h3>

HTML  is known as HyperText Markup Language. This is known to be a computer code that is often employed to put together or structure a web page and all of its content.

Note that The language was most likely to have been used is HTML as it help the designer to choose a font size and color for a web page Because HTML is regarded as the markup language that is often used to edit web pages.

Learn more about HTML from

brainly.com/question/4056554

#SPJ1

5 0
2 years ago
Other questions:
  • 1 2 3 4 5 6 7 8 9 10
    14·1 answer
  • A piston-cylinder device contains 0.8 kg of steam at 300°C and 1 MPa. Steam is cooled at constant pressure until one-half of the
    9·1 answer
  • Write a static method named fixSpacing that accepts a Scanner representing a file as a parameter and writes that file's text to
    5·1 answer
  • 6. Driving with parking lights only (in place of headlights) is against the law. A. True B. False
    15·2 answers
  • Three 1.83 in. diameter bolts are used to connect the axial member to the support in a double shear connection. The ultimate she
    8·1 answer
  • Could I please get help with this​
    11·1 answer
  • state &amp; prove parallelogram law of vector addition &amp;Also determine magnitude &amp;direction of resultant vector.​
    5·1 answer
  • 7. True or False? The positive effects of a new<br> technology always outweigh its negative effects.
    9·2 answers
  • Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
    12·2 answers
  • In a medical lab, Sandrine is working to isolate one element from a sample of liquid material. She uses a centrifuge, a machine
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!