Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Could you help writing a user defined function for part B and a for / while loop for part C . B . Averaging for
Could you help writing a user defined function for part B and a forwhile loop for part C
B Averaging for Each Year Write a userdefined function that calculates the average Ocean
average Ocean and average atmospheric for a given year. The specification of the
function is as follows:
Inputs: the two data tables TableOne & TableTwo and the year a scalar
Outputs: Average Ocean pH Ocean CO and Atmospheric for the specified year scalars
Use logical indexing andor the find function, NOT loops or if statements.
C Using the function that you wrote in part B calculate the average Ocean Ocean and
Atmospheric CO for each year from to Store the results in a matrix with the
following format:
Column : year
Column : average Ocean
Column : average Ocean CO
Column : average Atmospheric
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started