Coefficients of the least squares fit

Assignment Help MATLAB Programming
Reference no: EM13733456

A model of a newly designed aircraft was tested in a wind tunnel. Measure­ments where made of the effect of air velocity on drag forces. The following measured data was obtained:

 

v (m/s)

56.1

70.3

82.8

97.1

111.6

123.8

140.2

D (newtons)

25.3

32.1

48.2

73.0

80.7

110.5

145.7

 

 

where v is the air speed in metres per second and D is the drag force in newtons.

 

There is doubt about the relationship between D and v. Some suggest that the drag force D is linear in v, but others suspect that the relationship is quadratic.

 

1.  Write a Sa/Mkrus function that takes as its input the data and plots the data points and the least squares linear fit to the data. The function should also return the coefficients of the least squares fit.

 

2.  Write another Sa/Mkrus function that takes as its input the data and plots the data points and the least squares quadratic fit to the data. The function should also return the coefficients of the least squares fit.

 

3.  Write a driver script that runs the functions above and using the least squares coefficients returned by the functions creates a single plot comparing the differences between the data and the two least squares fit (the residuals of the two fits).

 

Comment on which approximation is a better fit to the data.

 

Notes

 

I. Each function needs to be properly commented including a dear de­scription of the purpose of the function, its parameter list and its return values.

 

For example, in MATLAB this means that a user should be able use the
help command to obtain information on how to use each function.

 

2. If multiple files are submitted a text README file which describes each of these functions should also be included.

 

3. All output data and plots must be properly labelled.

 

4. Each function should make use of vector/matrix operations where possible.

 

5. It is perfectly acceptable to make use of any of the built-in Sa/Mats functions except the polyfit function and the rymbolic toolbox.

 

6. All the appropriate files (including input files) should be submitted as one zip file. This single file should be uploaded via the StudyDesk.'

 

7. The pause command in MATLAB and halt command in SCILAB should be used to break up the various sections of the assignment in the main driver script and where appropriate in the functions.

Reference no: EM13733456

Questions Cloud

Identify the best legal form for your business : Write a one to two page paper defining keys to success and considerations for building a family business. Also compare the choice of business entities and identify the best legal form for your business based on your research in the community
Write an essay on Why the US Dollar is Falling : Write an essay on Why the US Dollar is Falling
General model for predicting long-run market share : A company is trying to predict the long-run market share of a new men's deodorant. Based on initial marketing studies, they believe that 35% of new purchasers in the market will ultimately try this brand. Calculate the long-run market share that the ..
How did the ojibwe girls develop their human capitals : how did the ojibwe girls develop their human capitals?
Coefficients of the least squares fit : Write a Sa/Mkrus function that takes as its input the data and plots the data points and the least squares linear fit to the data. The function should also return the coefficients of the least squares fit.
Write an essay on the economic effects of a falling dollar : Write an essay on the economic effects of a falling dollar
Describe the history of chinese immigrants in the us : Describe the history of Chinese immigrants in the U.S.
What is this monetary policy called : By raising and lowering short-term interest rates to keep inflation moving at a steady pace, many central bankers and academics thought they had finally found a monetary policy solution to conquer booms and busts of the business cycle.
How have you personally benefitted from globalization : How have you personally benefitted from globalization and Have you or anyone you know been negatively impacted by globalization? Explain your answer

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd