Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

MATLAB

As an engineer, you are asked to calculate the approximate surface area of a lake in your local community. To do that, you decide to use a GPS to measure the x and y coordinates at various points around the lake. You pick a starting point and calibrate your GPS position at that point to be (0,0). You begin to walk around the lake collecting the following data below and eventually return to your starting position.

Upon looking at the plot above, you realise that the best way to calculate the area of the lake is to split the data into two sets, fitting a polynomial to each data set and the integrating the polynomials to approximate the area of the lake. I.e. Calculate the area above the red line and add it to the area below the red line. However, to do this, you need to determine where the polynomial crosses the red line (i.e. the root of the function) so that the limits of the integral are known.

Write an m-file which does the following:

  1. Creates 2 sets of data for x [0 14] and x [14 0] with their corresponding y values. Fit 4th order

    polynomials to each set of data and output the equation for each fit using fprintf.

  2. Use the polynomial fit form part A to calculate the root of the polynomial that crosses zero. You

    may use the fzero function.

  3. Apply the Simpson’s 1/3rd rule using 21 points on the polynomial above the red line.

  4. Apply the Simpson’s 1/3rd rule using 21 points on the polynomial below the red line. You will need

    to use your result from part B here.

  5. Calculate the area of a single trapezoid found above the red line between the root crossing and

    x=14. This represents the excess area that needs to be subtracted.

  6. Calculate the approximate area of the lake.

x 0 246 8 101214 12 10 86 420 y03 5 88.57.14.9 1.7-2.6-3.8 -6.1 -5.9 -5.2-4.10 outline of lake 10 4 -6 -9 10 12 14

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.