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

  Implement and demosaic function in matlab

you need to implement and demosaic function in matlab. Load a image in a .png file and process it into a color image. I am required to use 'rggb' with linear interpolation. Can someone help me?

  Give examples of appropriate values

Give examples of appropriate values for each of the following type expressions. Do not use the empty list as the value for any list component

  Fingerprint watermarking techniques

Need to investigate the best method to embed watermark image into fingerprint image.

  The body fat percentage

The body fat percentage (BFP) of a person can be estimated by the formula BFP= 1.2xBMI+0.23xAGE -10.8xGEnder-0.54 where BMI is the body mass index, given by BMI = 703 W/H^2, in which W is the weight in pounds and H is the height in inches

  Characterizing population of about countries

Select 10 features characterizing the population of about 100 countries. load it into Matlab. Normalize the data between 0 and 1. (min, max and minmax are some useful Matlab commands)

  write a function under the name "write2"

a)Write a function under the name "write2" so that it will save the diagonal component of the given matrix...

  F data into matlab using only the textread function?

load the following type of data into mathlab using ONLY the textread funcion? Need to import it and plot it using boxplot.

  Write a function that takes a list of integers as argument

Write a function that takes a list of integers as argument and returns a pair consisting of the sum of the even positions and the sum of the odd positions of the list. You should not use any auxiliary functions.

  Write a matlab program to multiply two matrices

Write a MATLAB program to multiply two matrices together. Do not use the MATLAB matrix multiplication function, A*B.

  Write matlab scripts

Write MATLAB scripts for to accept two numbers from the user; Display all prime numbers between these two numbers.

  Pattern recognition

Research and discover more in-depth knowledge about topics in Pattern Recognition and choose a topic. The best topic will be the one you are most interested in or a topic from your research project you are working on.

  Generate by means data.m an array

Generate by measdata.m an array A withsize (365,24), containing temperature measurements for an entire year [1 January,..., 31 December], 24 hours a day [00.00h,...,23.00h].

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