Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The xy_data.txt file contains the x and y coordinates. Values in the first row correspond to the x coordinates and values in the second row

The xy_data.txt file contains the x and y coordinates. Values in the first row correspond to the x coordinates and values in the second row correspond to the y coordinates.

A. Use importdata() to import the x and y coordinates. Plot x against y as black circles.

B. Using the entire data set, fit a 7 th order polynomial to the data. Plot this data on a figure with an increased resolution of x.

C. Separate the data into two sets, when x<0 and when x>0. For data where x<0, fit a 3 rd order polynomial using polyfit. For when x>0, fit a 4 th order polynomial using polyfit. Plot this data on the same figure with an increased resolution of x for both. Ensure you label the axes and include a legend.

D. Determine the value of y at x = 0 using all 3 polynomials fitted to the data. Use fprintf to print this information. Example output is shown below. For 3 rd order, 4 th order and 7 th order polynomials, y=? y=? and y =? at x=0 respectively.

need the M-file code for this question and I will provide the data from the x-y txt in the comments.

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

Elementary Surveying An Introduction to Geomatics

Authors: Charles D. Ghilani, Paul R. Wolf

13th Edition

978-0132554343, 132554348, 978-0273751441

More Books

Students also viewed these Databases questions

Question

Describe the concept of layers in a geographic information system.

Answered: 1 week ago

Question

Find the magnitude of a. b. c.

Answered: 1 week ago