# Engineering and Computing ;Assessment Task 2

Engineering and Computing ;Assessment Task 2

complete the following exercise and write a concise sub-report documenting and explaining your solutions. Please note that your report must reference any sources, such as textbooks or web pages, that you have used to help develop your solution

This homework is designed to test your knowledge in Simulation using Matlab. Homework must be submitted before the end day of 2/March/2015.

What to turn in: Copy the text from your scripts and paste it into a document. If a question asks you to plot or display something to the screen, also include the plot and screen output your code generates. Submit a printed report and email me the .doc or .pdf file.

1. System of linear equations (5 marks)

Consider the following system of linear equations: 4×2 + 2×1 – 35 +4×3 – x4 = 2

6×3 + 8×2 – 40= 0

7×1 + 5×2 + 6×4 + 3×3 = 39

–x1 + 4×2 – 9×3 + 7×4 = -54

Use MATLAB to find the values (if any) of x1, x2, x3 and x4 which satisfy this set of linear equations.

Study Group University of Lincoln

2. Question 2 (29 marks)

Dribblefire Jets make two types of jet, the two-engined DFII and the four-engined DFIV. The engines are terrible and fail with probability 0.5 on a standard flight (independently of each other). The manufacturer claims that the planes can fly if at least half of their engines are working—that is, the DFII will crash only if both engines fail while the DFIV will crash if all four, or if any three, engines fail.

You have been commissioned by the Federal Aviation Agency to ascertain which of the two models is less likely to crash. Since parachutes are expensive, the cheapest (and safest!) way to do this is to simulate a large number of flights of each model. For example, two calls of Math.random can represent one standard DFII flight: If both random numbers are less than 0.5, that flight crashes; otherwise, it doesn’t. Write a solution which simulates a large number of flights of both models and estimates the probability of a crash in each case. If you can run enough simulations, you may get a surprising result. (Incidentally, the probability of n engines failing on a given flight is given by the binomial distribution, but you do not need to use this fact in the simulation.)

1. Create a function which generates two vectors with n random numbers in the range 0-1, and write them into a file. This function should have the following definition: (4 marks)

function generateDFIIExperiment(filename, n)

% filename: the name for saving the generated numbers % n: the number of random numbes in this experiment.

2. Create a function which generates four vectors with n random numbers in the range 0-1 and write them into a file. This function should have the following definition: (4 marks)

function generateDFIVExperiment(filename, n)

% filename: the name for saving the generated numbers % n: the number of random numbes in this experiment.

3. Create a function which load two experiment files (one for each jet type), and check for each jet if it can fly as mentioned in the question. Then display a graph of the engine flying case for each experiment. (8 marks)

function checkFly(DFIIfile, DFIVfile) %DFIIfile: file name of the DFII experiment %DFIVfile: file name of the DFIV experiment

4. Call these methods with different n vales (10,100, 1000, 10000…) (4 marks)

5. Explain which of the two models (DFII and DFIV) is less likely to crash (2

marks)

6. Write a report about your experiments and analyze the results. (7 marks)

PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂

**50 %**discount on an order above

**$ 200**

Use the following coupon code :

Stay Safe

## Follow Us!