Write a driver script that runs the functions

Assignment Help MATLAB Programming
Reference no: EM13742816

A model of a newly designed aircraft was tested in a wind tunnel. Measurements 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 meters 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 Sci/Matlab 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 Sci/Matlab 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.

1. Each function needs to be properly commented including a clear description 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 labeled.

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 Sci/Matlab functions except the polyfit function and the symbolic 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: EM13742816

Questions Cloud

What stakeholders require communication : What is the best way to ensure the implementation of an organizational change. What stakeholders require communication
Calculate total surplus of the market with the price ceiling : A market has a demand curve described by P=30-Q, a supply curve described by P=16+Q, and a price ceiling of 20. Calculate the Total Surplus of the market with the price ceiling
According to keynesian theory : According to Keynesian theory:
Employment and gross domestic product : The purchase of copy paper by Intel for the company staff. The purchase of an electronic handheld organizer by a sales manager to keep track of clients. The purchase of a new aircraft carrier by the Navy
Write a driver script that runs the functions : 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.
Zero-coupon bonds from a struggling foreign nation : The US recently purchased $1 billion of 30-year zero-coupon bonds from a struggling foreign nation. The bonds yield 4.5% per year interest. Zero coupon means the bonds pay no annual interest payments. Instead, all interest is at the end of 30 years.
Deal with the possibility of this negative development : What potential threat, if it occurred, would prove most disastrous for Fujitsu, and what could the company do to deal with the possibility of this negative development?
The major forms of resistance to enslavement : The major forms of resistance to enslavement.
Demand–supply graph and label the axes with the price : Draw a demand–supply graph and label the axes with the price and quantity of khaki pants. Next, for each scenario, draw the appropriate demand–supply curve. Compare the new demand curve or supply curve by drawing it on the same graph.

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