logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Ivan BlankBusiness
(5/5)

874 Answers

Hire Me
expert
Bharat BhushanData mining
(5/5)

763 Answers

Hire Me
expert
Christopher MclaughlinMathematics
(5/5)

846 Answers

Hire Me
expert
Rameshwar DassHistory
(5/5)

538 Answers

Hire Me
MATLAB
(5/5)

person is traveling in a rainy day from London to Cambridge on a direct train without intermediate stops.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS
MATLAB Assignment

Question 1 (50 marks)

The Euler's number (𝑒) is an important mathematical constant that forms the base of the natural logarithms. This number can be obtained in MATLAB by typing: exp(1), in other words, 𝑒 to the power of 1. The exact value of 𝑒 can be defined by the infinite series: 

where 𝑛! is the factorial of 𝑛. 𝑒 = ∑ 𝑛=0 1n!

You are asked to create a MATLAB M-file named “problem1_XXX.m” (exactly like this, without capital letters or spaces, and substituting XXX by your full student number) that

1.  uses a FOR loop to display in the Command Window the first 10 terms in the sequence. Hint: the factorial of 𝑛 (or 𝑛!) in MATLAB is obtained by typing factorial(n). (20 marks)

2.  calculates the series using the first 10 terms of the sequence.  

4.        creates a plot in which the number of terms that are included in the series appears in the abscissa (π‘₯) and the result of the series for the corresponding number of terms appears in the ordinate (𝑦). The line should contain ‘x’ markers to indicate each value of the series.

Question 2 (50 marks)

A person is traveling in a rainy day from London to Cambridge on a direct train without intermediate stops. This person decides to take pictures of one of the windows of the train at intervals of 30 s. The window is a rectangle with a length of 2 m and a height of 1 m. In total, 62 pictures were taken in the 30.5-minutes journey. In each of them the coordinates of the start and the end points (points A and B, respectively) of the rain drops that hit the window were annotated with respect to the system of Cartesian axes represented in Figure 1. This data is included in the files available on Moodle:

XYpoints_timeFromDeparture_XXX.txt

where XXX represents the time from departure in which the picture of the window was taken, in seconds. You should download all these files from the Moodle assignment to your working directory before attempting to complete the exercise. Do not save these files in a different folder, your script should work with the data files stored in the same folder as the script (do not submit the data files, submit only the script, as explained previously). The format in each of these data files is the following:

Column 1: X coordinate of the start point A of the drop in the window, in m. Column 2: Y coordinate of the start point A of the drop in the window, in m. Column 3: X coordinate of the end point B of the drop in the window, in m. Column 4: Y coordinate of the end point B of the drop in the window, in m.

πœƒπ‘€π‘–π‘›π‘‘ = 300 with respect to the vertical line. Consider that positive angles as counter clock-wise in this exercise. You should also assume that in each time instant the rain drops on the window are only those that appear in the corresponding text file, with the previous ones being completely removed from the window. Also assume that the train movement is completely horizontal in the negative-X direction of Figure 1.

You are asked to create a MATLAB M-file named “problem2_XXX.m” (exactly like this, without capital letters or spaces, and substituting XXX by your full student number) to:

1. Plot all the rain drops on the window when the time is 0 s (i.e. at the start of the journey) using a FOR loop. The plot should be contained exactly in the perimeter of the window and the rain drops should be represented as solid blue lines that connect the corresponding start and end nodes. Do not represent any additional line in the figure.

2.  Define another FOR loop to plot all the rain drops on the window at time equals 180 s (i.e. 3 minutes after departure). The plot should have the same format requirements as the one in the previous section. Using the same FOR loop created for this section, the absolute velocity of the train with respect to a fixed reference (π‘‰π‘‘π‘Ÿπ‘Žπ‘–π‘›) should be estimated after 180 s from departure. This should be calculated from the arithmetic mean of the angle formed by each rain drop and the vertical line (πœƒ, see Note 3 below). The train velocity should be displayed in the command window in mph.

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. ThisΒ  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme