Question: MatLAB project, really don't know how to do it, could someone please help me and make it as easy as possible to put into my

MatLAB project, really don't know how to do it, could someone pleaseMatLAB project, really don't know how to do it, could someone please help me and make it as easy as possible to put into my own MATlab and run?

In your code for arevol, after you calculated D-abs det(A)) put D closetozeroroundoffD) Part IV. Area, Volume, and Graphics in MATLAB Difficulty: Moderate GOAL: In this part you will work with an application of matrices and determinants to Geometry, and specifically, to calculation of area and volume. You will also touch a basis of the graphics in MATLAB, when working with transformations of the plane. and then procced with the conditional statements that are indicated below. This will ensure that D 0 shows as D-0, not as a number 2.66543210000076e-14, for example Exercise 4 (4 points) The area of a parallelogram in R2 built on vectors v, v, and the volume of a parallelepiped If D 0, the function has to output one of the messages: The points lie on the same line and no parallelogram can be built" in R, built on vectors v" v:, v, are det Al (or absidet A)), where As [v, v.] and A V V v,], respectively. (See also Section 3.3 of the textbook.) You will be given 3 points in R(three vertices of a parallelogram-the 4th vertex is defined by the 3 given) or will be given 4 points in R'(four vertices of a parallelepiped the rest of the vertices is defined by the 4 given). The input points, represented by their position vectors, will be the columns of a 2x3 matrix B =[si X, X3] (or a 3x4 matrix B=[x, x2 x, xJh The points lie in the same plane and no parallelepiped can be built" If the determinant is not zero, the function displays one of the messages: The area of the parallelogram is" and outputs D The volume of the parallelepiped is" and outputs D *Create a function in MATLAB: function D- arevol(B) depending on which of the above you have calculated. that would calculate 2 vectors in R2: V, (or 3 vectors in R': v, v,, v,) on which a parallelogram (or parallelepiped) is built you should subtract vector x, from cach other vector For example, in R. if B = [x, x? &J , then v.-x,-x, , v,-x,-x, (obviously, the 4th vertex x4-x, + v, t v, but we do not use it!). And the matrix A = [v, v.) Output the 2x 2 matrix A=[v, v.] (or a 3x3 matrix A = [v, v2 v3). Calculate the area D of the parallelogram (or the volume D of the parallelepiped) built on the vectors formed by the columns of A. Important Note: It might happen that the area (volume) represented by D is supposed to be a zero but, due to round off error it doesn't show as a zero but as a very small positive number In this course we will consider the numbers or, in general, the entries of a matrix, whose absolute values are less than 10to be zeros. In order to archive i, you will need to create, type in the diary file, and put in your code for arevol the following function (this function is used a lot!): (Hint: to display a message, you can use aMATLAB command disp( text')-the command will display the word: text. Also, you will need to keep track on the dimension of the space that you working with in order to display a correct message for area or volume, depending what you are calculating. MATLAB conditional statement could be in use.) Type the functions closetozeroroundoff and arevol in your diary file. *Run the function D-arevol(B) on each of the following matrices: (a) B randi-10,10], 2, 3) (b) B randi(-10,10], 3, 4) (c) X - randi(-10,10], 2,1), B[X,-X, 2*X (d) Xrandi(-10,10, 3, I),Yrandi(-10,10], 3, 1), B X, Y, X+Y, X-Y] Notice: the matrices in (c) and (d) are created by using vectors. function B-closctozeroroundoffiA) [m,n]-size(A) for i-I:m if abs(A(ij) 10 (-7) end end end B-A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!