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

  Compute the power spectral density vector

Compute the power spectral density vector. Plot the spectrogram using the same parameters as in lecture.

  Construct the shear force and bending moment diagrams

Write the algorithm and draw the flowchart for each problem

  Program should be able to handle collisions

Write a program that, given a list of 5 social security numbers, finds the memory locations assigned by the hashing function h(k) = k mod 55 to store customer records. program should be able to handle collisions.

  Write matlab scripts

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

  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

  Implement linear support vector machine to classify data

code to implement linear Support vector machine to classify data (without using matlab built in function).

  Obtain the cross products using matlab cross function

Use MATLAB cross function to obtain the above cross products. Note that the accelerations are known functions of the derivatives of the three coordinates.

  Find the laplace transforms

Find the Laplace transforms of the following functions - Find the partial fraction

  Create from the stack a structure string stac

Design a structure stack that represents a stack of elements of some arbitrary type. Include the functions: create(returns an empty stack), push(add an element to the top of the stack and return the resulting stack), pop(delete the top element and re..

  Write a script to solve the following systems of equations

Write a script to solve the following systems of equations using both matrix left division (\) and the inverse matrix method and Show that you have tested your MATLAB code appropriately

  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

  If the outer cylinder is fixed and the inner cylinder

sae 50 oil at 20 degrees c fills the concentric annular space between an inner cylinder ri5 cm and an outer cylinder

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