Create m-file scripts/functions to solve some basic vector problems in MATLAB A. (8 points) We are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create m-file scripts/functions to solve some basic vector problems in MATLAB A. (8 points) We are interested in analyzing weather temperature data for each day in a month. We have a vector of the low temperature on each day and a corresponding second vector of the high temperature on each day. The first elements in each vector are for the first day of the month, the second elements in each vector are for the second day of the month, etc. Here are two sample vectors you can use, but your code should work for any two vectors of the same length: lows = [59 58 61 62 64 61 49 44 50 50 60 47 41 43 54 65 69 58 53 47 40 38 47 43 42 46 44 43 58 44 44]; highs = [65 67 67 75 82 76 72 66 63 73 76 68 58 68 71 72 85 78 72 60 55 61 73 57 53 51 52 66 73 58 62]; Write a single MATLAB statement to create each result. a. How many days had a high temperature over 75? b. Assign the index of the day of the month with the largest difference between the high and low temperature to the variable maxIndex. c. What is the average low temperature for days when the high temperature was below 70? d. The first day for the above sample vectors are for a Saturday. Find the average high temperature for all Saturdays in the month. Create m-file scripts/functions to solve some basic vector problems in MATLAB A. (8 points) We are interested in analyzing weather temperature data for each day in a month. We have a vector of the low temperature on each day and a corresponding second vector of the high temperature on each day. The first elements in each vector are for the first day of the month, the second elements in each vector are for the second day of the month, etc. Here are two sample vectors you can use, but your code should work for any two vectors of the same length: lows = [59 58 61 62 64 61 49 44 50 50 60 47 41 43 54 65 69 58 53 47 40 38 47 43 42 46 44 43 58 44 44]; highs = [65 67 67 75 82 76 72 66 63 73 76 68 58 68 71 72 85 78 72 60 55 61 73 57 53 51 52 66 73 58 62]; Write a single MATLAB statement to create each result. a. How many days had a high temperature over 75? b. Assign the index of the day of the month with the largest difference between the high and low temperature to the variable maxIndex. c. What is the average low temperature for days when the high temperature was below 70? d. The first day for the above sample vectors are for a Saturday. Find the average high temperature for all Saturdays in the month.
Expert Answer:
Answer rating: 100% (QA)
Heres the MATLAB code to solve the given vector problems Given low and high temperature vectors lows ... View the full answer
Related Book For
Business Statistics For Contemporary Decision Making
ISBN: 978-1118749647
8th edition
Authors: Black Ken
Posted Date:
Students also viewed these programming questions
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Governmental Funds Statement of Revenues Expenditures and Changes in Fund Balance. You have recently started working as the controller for a small county. The county is preparing its financial...
-
A company is contemplating investing in a new piece of manufacturing machinery. The amount to be invested is $150,000. The present value of the future cash flows generated by the project is $145,000....
-
The reaction of ninhydrin with an ?-amino acid occurs in several steps. (a) The first step is formation of an imine by reaction of the amino acid with ninhydrin. Show its structure and the mechanism...
-
Price Differentiating E-commerce websites "alter results depending on whether consumers use smartphones or particular web browsers," 34 reports a new study. The researchers created clean accounts...
-
On October 1, 2012, Holmgren Chemical was identified as a potentially responsible party by the Environmental Protection Agency. Holmgrens management along with its counsel have concluded that it is...
-
Coolbrook Company has the following information available for the past year: sales revenue Cost of goods sold and operating expenses Net operating income Average invested assets The company's hurdle...
-
Laker Company reported the following January purchases and sales data for its only product. For specific identification. ending inventory consists of 180 units from the January 30 purchase, 5 units...
-
Much of the stock of capital in the economies of Japan and Germany was destroyed during World War II. 1.) Use the point drawing tool to plot and label a point on the graph that indicates the position...
-
Consider the following planning economy problem: such that and In addition, max Et Ct,kt+1 t=0 Bt 1-o q+It=yti Yt = 2+k; 2 kt+1= It+ (18) kt. In z = pln z-1 + 7. Above: c is aggregate consumption; k...
-
A1) Design a sequence recognizer (Mealy machine) for a sequence of '0010'. Look at the following example. Input X: Output Z: 0010 0101 1010 1110 1011 0010 1100 0101 1011... 0001 0000 0000 0000 0000...
-
(a) Draw a binary tree with 10 nodes labeled 0, 1,..., 9 in such a way that the inorder and postorder traversals of the tree yield the following lists: 4, 1,6,3,9,2,5,7,0,8 (inorder) and 6, 1,4,9, 0,...
-
3. Find an approximate solution for the double integral 1.5 1 = L L 20 drdy I ery combining at least 2 different methods. Then, compute the percent relative error considering that the true value is...
-
A 1000kg F1 car in on start-finish straight heading to the first corner at 192mph. Determine the: 1) Velocity in m/s. (5) 2) Weight of the car. (5) 3) kinetic energy of the car. (10) 4) upload a file...
-
Explain why each of the following is either a private good or a public good: traffic lights, in line skates, a city park, a chicken salad sandwich, a tennis racket, national defense, a coastal...
-
Two processes in a manufacturing line are performed manually: operation A and operation B.A random sample of 50 different assemblies using operation A shows that the sample average time per assembly...
-
Use the values in the cross-tabulation table to solve the equations given. a. P(E) = _______ b. P(B D) = _______ c. P(A E) = _______ d. P(B | E) = _______ e. P(A B) = _______ f. P(B C) = _______...
-
Use the test 3 to determine whether the following binomial distributions can be approximated by using the normal distribution. a. n = 8 and p = .50 b. n = 18 and p = .80 c. n = 12 and p = .30 d. n...
-
Laura says she doesnt believe that humans were at one time chimpanzees or gorillas. Jeff says he doesnt believe it either. Explain why biologists also dont believe that humans are descended from...
-
Write a letter to Grandma telling her about drug resistance in living organisms. Explain to her why drug resistance is such a common phenomenonincluding why insects become more resistant to...
-
During a drought, the supply of seeds available to a finch population decreases. The smaller, softer seeds, which are easier to crack, are quickly eaten up. Finches with larger, stronger beaks are...
Study smarter with the SolutionInn App