Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In your lab assignment, you looked at histocial preciptiation across the entire year. Let's take a small segment of that data to look at here.

In your lab assignment, you looked at histocial preciptiation across the entire year. Let's take a small segment of that data to look at here. March was a productive month for precipitation. Here's the row from that data file:

march = [2,0,17,27,0,11,0,0,30,25,0,0,0,45,70,0,0,0,0,0,27,26,0,0,9,6,78,0,5,8,0]; See the Learner Template for this code.

How many days had more than 6 hundredths of an inch (remember, that's our unit here) of precipitation? Save this to days_more_than_six.

Assuming that Sunday was on the 2nd day for this month, find the total number of days in each full week (Sunday to Saturday) where there was a non-zero precipitation fall. Save these values into a column vector, days_precip_each_week.

Finally, write the set of conditionals to test if the first full two weeks had more, less, or the same number of days of precipitation as the last two full weeks of the month. If more, set first_half_vs_second_half to -1. If the same, then set first_half_vs_second_half to 0. And if less, then set first_half_vs_second_half to 1.

Hint: you're going to need to find a function to add up sets of numbers in a vector. Do not just use a bunch of element indexing statement (don't do march(1,1) + march(1,2) etc, or similar).

image text in transcribed

1 \% Our March data is: march=[2,0,17,27,0,11,0,0,30,25,0,0,0,45,70,0,0,0,0,0,27,26,0,0,9,6,78,0,5,8,0]; \% Now add your code... Assessment: How many days in March had more than 6/100ths of precipitation? Is the number of days that had a non-zero precipitation for each week correct

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions