[SOLVED] MAT350 5.2 MATLAB: Linear Transformations

$ 165.00

MAT350 5.2 MATLAB: Linear Transformations

In this activity you will create a linear transformation matrix and apply it to a set of points, creating a plot of the original and rotated polygons.

The following matrix represents a linear transformation from to ,rotating each point counterclockwise about the origin by an angle , in radians.

A = [ cos(theta) -sin(theta)]

sin(theta) cos(theta)

Order Now
Order This Paper

MAT350 5.2 MATLAB: Linear Transformations

In this activity you will create a linear transformation matrix and apply it to a set of points, creating a plot of the original and rotated polygons.

The following matrix represents a linear transformation from to ,rotating each point counterclockwise about the origin by an angle , in radians.

A = [ cos(theta) -sin(theta)]

sin(theta) cos(theta)

 

The standard matrix A that rotates a point 45 degrees counterclockwise about the origin is given below.

A = [cos(pi/4) -sin(pi/4); sin(pi/4) cos(pi/4)]

 

Create a matrix S containing the points of the unit square as the columns.  Order the points as they would be traversed when drawing the edges of the square, repeating the starting point so that the drawing starts and ends there.

S = [0 1 1 0 0; 0 0 1 1 0]

 

Plot the unit square.

plot(S(1,:), S(2,:))

 

Perform matrix multiplication to transform each of the points in S.

T1 = A*S

 

Plot the original unit square and the transformed unit square.

plot(S(1,:), S(2,:), T1(1,:),

Note: Full answer to this question is available after purchase.
T1(2,:))

 

For this activity, rotate the triangle formed by the points (0,0), (1,1), and (3,0) counterclockwise  about the origin.  The order for drawing the triangle is to start at point (0,0), move to (1,1), then to (3,0), and finish at (0,0).

Do you run into any difficulties?  Explain what is happening as a comment in your code.

Create the standard matrix A that rotates a point 60 degrees counterclockwise about the origin.

theta = deg2rad(60);

A = [cos(theta) -sin(theta); sin(theta) cos(theta)];

disp(A);

Create a matrix S containing the points of the triangle as the columns.

S = [0 1 3 0; 0 1 0 0]

disp(S);

Perform matrix multiplication to transform each of the points in S.  Store this in T1.

T1 = A*S

disp(T1);

Plot the original triangle and the transformed triangle in a single graph.

plot(S(1, :), S(2, :), T1(1, :), T1(2, :));

Do you run into any difficulties?  Explain what is happening as a comment in your code.

Related; MAT350 4.6 MATLAB. & MAT350 7.3 MATLAB: Norms and Distances.

Order This Paper

Reviews

There are no reviews yet.

Be the first to review “[SOLVED] MAT350 5.2 MATLAB: Linear Transformations”

Your email address will not be published. Required fields are marked *

error: Content is protected !!