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

  Approximate the solution to the above initial value problem

dydt te3t - 2y 0 le t le 1 y0 0approximate the solution to the above initial value problem usinga modified-euler

  Demonstrate the effect of zero-padding

Write a programs in Matlab to demonstrate the effect of zero-padding and filtering the DC-component in the frequency domain.

  When a fast-breeder reactor is shut down quickly the

when a fast-breeder reactor is shut down quickly the temperature of the surface of a number of components drops from

  Simulate and compare the ber of a 16-psk system

Question is that" Simulate and compare the BER of a 16-PSK system and a 16-QAM system without Grey coding and Eb/N0=0,2,4,6,8,10 dB. "

  Write a script that simulates a casino machine

Write a script that simulates a casino machine. To play a single round on the machine user pays $ 5. Now when the user start the machine, the machine rolls a pair of dice (simulate both dice with help of random number generator) and user only wins..

  Calculate an approximation to the energy consumed

Calculate an approximation to the energy consumed over the period and calculate an approximation to the energy consumed over the period t = a to t = b.

  Program the rank order cluster algorithm with a matrix

Program the rank order cluster algorithm with a matrix with x rows and x columns in any plataform (that the person inputs). I prefer visual studio or visual basic

  The power input p to a centrifugal pump is assumed to be a

the power input p to a centrifugal pump is assumed to be a function of the volume flow rate q impeller diameter d

  Create a transformation matrix

Find the transformation matrix T02, i.e. T defining {0} with respect to {2}. Learn how to compute the inverse of T20 to get this. Verify that this works by using tranimate to view the movement of frame

  Design simple interface hardware

Evaluate the capability in selecting and configuring a microcontroller unit designing simple interface hardware and writing subroutines to operate those interfaces

  Create a function that will determine the total resistance

Create a function that will determine the total resistance of a number of resistors that are connected in parallel. This function should accept a row vector for input,

  Create a matlab program

Create a MATLAB program that will use MATLAB's fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d .

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