Macquarie University, Department of Mathematics and Statistics MATH1020 Mathematical Modelling IB Session 2 2020 Matlab Assignment Due 10:00 pm Thursday October 29 Instructions for Students Students...

check pdf


Macquarie University, Department of Mathematics and Statistics MATH1020 Mathematical Modelling IB Session 2 2020 Matlab Assignment Due 10:00 pm Thursday October 29 Instructions for Students Students in MATH1020 are expected to be familiar with the contents of the Matlab Manual. Students are also expected to be able to use the help browser in Matlab. These resources should be utilised before asking a lecturer for assistance. You will need to submit a single pdf document. It must be 4 pages long and include (in this order): 1. A page of handwritten answers to algebra question 1, and calculus questions 1(b), 1(d), and 1(e) (include your name and student number at the top of the page). 2. A one–page printout of your command window showing your working and answers for algebra question 1, and calculus questions 1(a), 1(c), 1(d), and 1(e). 3. The 3 subplots from algebra question 2 and calculus question 2, each on their own page. You will lose marks if your assignment does not follow this layout. To scan your handwritten notes, use an smartphone app such as ClearScanner (instructions on iLearn). To combine your separate files into a single pdf, you can use Word/Pages/Google Docs and export as a pdf. You can also use Preview (on Mac). If you have used it before you can use LATEX with the pdfpages package. There are many other methods available as well. Instructions for the command window printout 1. Your command window printout should not contain any errors or unnecessary commands. If you make an error, use Clear Command Window (found by pressing the menu arrow in the top right-hand corner of the Command Window or using the command clc) and repeat the correct commands using the arrow keys on your device’s keyboard. 2. Suppress unnecessary output using semi-colons (see section 1.2.3 of the Matlab Manual). Only display the output requested in each question. 3. Print the contents of your Matlab Command Window by pressing the menu arrow in the top right-hand corner of the Command Window and selecting ‘Print’, then ‘Save as PDF’. Saving plots can be done similarly from the plot window. Algebra 1. Consider the matrix C =  −1 0 −1 −2 4 5 2 5 4 3 3 2 3 5 1 4  Form the augmented matrix [C|I], where I is the 4 × 4 identity matrix. Use Matlab to reduce [C|I] to reduced row echelon form. Use this to find C−1. Include the Matlab code and output for the reduced row echelon form of [C|I] in the Matlab printout, and write the matrix C−1 on your handwritten answers. 2. In the next question you are going to create a six sided irregular polygon and apply linear transformations to it. Before you begin, work through the example below. To create a six sided polygon we need a 7× 2 matrix A, where the entries of each row of A represents the (x, y) coordinates of each vertex of the polygon. >> A = [1 -1;-1 1;1 2;2 1;2 0;1 0;1 -1]; Notice the first and last coordinate are the same, this is so we can close the polygon. To create a picture of the polygon >> p = polyshape(A); >> plot(p,‘FaceColor’,‘green’) >> axis equal To perform a linear transformation, such as say a dilation by a factor of 2 or a reflection in the y-axis >> B = A*[2 0;0 2]; >> p1 = polyshape(B); >> C = A*[-1 0;0 1]; >> p2 = polyshape(C); (a) Create a six sided irregular polygon called p. Your polygon must be different from the example. (b) By multiplying by a matrix, perform a rotation by an angle π/2 in a counterclockwise direction on p, to obtain a new polygon p1. Do not use the Matlab function rotate, it does not do this. (c) Perform a reflection in the y-axis followed by a clockwise rotation by an angle of π/2 on p, to obtain a new polygon p2. (d) Use the subplot command (see SGTA 10) to display the three plots of p, p1 and p2 on a single page. Label your plots clearly. Include the figure on its own page of your assignment. Calculus 1. (a) In Matlab, determine an estimate for the integral ∫ 2 1 ex sin(x) dx using the trapezoidal rule with step size 0.1. (See section 1.11.1 of the Matlab Manual). Include the Matlab code and output in the Matlab printout (provide a number as the result). (b) Use the comparison test for improper integrals and the p–test to determine whether the integral∫ ∞ 1 1 2 + 2x2 dx converges or diverges. Include your working in the handwritten answers. You may not use the fact that ∫ 1 1+x2 dx converges. (c) Use Matlab to evaluate the integral from 1(b). Give an exact answer, do not give a numerical approximation (for example, don’t use the trapezoidal rule). (See section 1.9.1 of the Matlab Manual). Include the Matlab code and output in the Matlab printout. (d) Use Matlab to evaluate the sum ∞∑ k=1 1 k . Interpret the result in terms of convergence/divergence. Use double to provide a number as the result if the sum converges (see Section 1.9 of the Matlab Manual). Include the Matlab code in the Matlab printout. Include the explanation in your handwritten answers. (e) Use Matlab to evaluate the sum ∞∑ k=0 sin ( 2k arctan(k2) ) . Use double to provide a number as the result if the sum converges (see Section 1.9 of the Matlab Manual). Include the Matlab code and output in the Matlab printout. In the handwritten solutions, write whether or not it converges, and if so, what it’s value is. 2. (a) Plot level curves for the surfaces below using contour. Use a meshgrid(-2:0.05:2). i. f(x, y) = 9− x2 − 9y2 for z = 0.1, 0.5, 1, 5, 10 ii. f(x, y) = xe−x 2−y2 for z = −0.4,−0.2, 0.2, 0.4 (b) Use the surf command to plot the surface f(x, y) = cos(x2 + y2), using the same meshgrid as in part (a). Create a figure containing three subplots, two for 2(a)(i) and 2(a)(ii) across the upper half of the figure and a third subplot for 2(b) that spans the lower half of the figure. You may need to refer to the help browser to work out how to do this. Label your plots clearly. Include the plot on its own page of your assignment.
Oct 29, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here