Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 Write a general MATLAB function for integrating experimental data using Simpson's 1/3 rule. Your function should check if there are an odd number

image text in transcribed

Part 1 Write a general MATLAB function for integrating experimental data using Simpson's 1/3 rule. Your function should check if there are an odd number of intervals, if there are, the trapezoidal rule should be used for the last interval. The first line of your MATLAB function should look like function I = Simpson . LastName (x,y) where the function numerically evaluates the integral of the vector of function valuesywith respect to 'x' Your matlab function should also include the following: Error check that the inputs are the same length Error check that the x input is equally spaced Warn the user (not an error, just a warning) if the trapezoidal rule has to be used on the last interval. Part 2 Two important quantities when studying fermentation are the carbon dioxide evolution rate (g/h) and the oxygen uptake rate (g/h). These are calculated from expiremental analysis of the inlet and exit gases of the fermentor, and the flow rates, temperature, and pressure of these gases. Using your function in part 1, and the data table below, calculate the total amount of carbon dioxide produced and oxygen consumed during fermentation. Compare to the value that the MATLAB function trapz (0 computes. Time of Fermentation (h) Carbon Dioxide Evolution Rate (g/h) Oxygen Uptake Rate (g/h) 140 15.49 141 142 143 144 15.72 15.53 15. 19 16.56 16.21 16. 16 15.35 15.13 14.20 Part 1 Write a general MATLAB function for integrating experimental data using Simpson's 1/3 rule. Your function should check if there are an odd number of intervals, if there are, the trapezoidal rule should be used for the last interval. The first line of your MATLAB function should look like function I = Simpson . LastName (x,y) where the function numerically evaluates the integral of the vector of function valuesywith respect to 'x' Your matlab function should also include the following: Error check that the inputs are the same length Error check that the x input is equally spaced Warn the user (not an error, just a warning) if the trapezoidal rule has to be used on the last interval. Part 2 Two important quantities when studying fermentation are the carbon dioxide evolution rate (g/h) and the oxygen uptake rate (g/h). These are calculated from expiremental analysis of the inlet and exit gases of the fermentor, and the flow rates, temperature, and pressure of these gases. Using your function in part 1, and the data table below, calculate the total amount of carbon dioxide produced and oxygen consumed during fermentation. Compare to the value that the MATLAB function trapz (0 computes. Time of Fermentation (h) Carbon Dioxide Evolution Rate (g/h) Oxygen Uptake Rate (g/h) 140 15.49 141 142 143 144 15.72 15.53 15. 19 16.56 16.21 16. 16 15.35 15.13 14.20

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago