MATLAB: Linear Transformations In this activity you will create a linear transformation matrix and apply it...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 R² to R², rotating each point counterclockwise about the origin by an angle , in radians. [cos(0) -sin(0)] [sin(0) cos(0) A = 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,:), T1(2,:)) For this activity, rotate the triangle formed by the points (0,0), (1,1), and (3,0) counterclockwise 60° 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. Script> Save C Reset MATLAB Documentation 1 %Creat the standard matrix A that rotates a point 60 degrees counterclockwise about the origin. 2 3%Create a matrix S containing the points of the triangle as the columns. 4 5 %Perform matrix multiplication to transform each of the points in S. Store this in T1. 6 7 %Plot the original triangle and the transformed triangle in a single graph. 8 9 %Do you run into any difficulties? Explain what is happening as a comment in your code. 10 ▶ Run Script 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 R² to R², rotating each point counterclockwise about the origin by an angle , in radians. [cos(0) -sin(0)] [sin(0) cos(0) A = 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,:), T1(2,:)) For this activity, rotate the triangle formed by the points (0,0), (1,1), and (3,0) counterclockwise 60° 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. Script> Save C Reset MATLAB Documentation 1 %Creat the standard matrix A that rotates a point 60 degrees counterclockwise about the origin. 2 3%Create a matrix S containing the points of the triangle as the columns. 4 5 %Perform matrix multiplication to transform each of the points in S. Store this in T1. 6 7 %Plot the original triangle and the transformed triangle in a single graph. 8 9 %Do you run into any difficulties? Explain what is happening as a comment in your code. 10 ▶ Run Script
Expert Answer:
Related Book For
Practicing Statistics Guided Investigations For The Second Course
ISBN: 9780321586018
1st Edition
Authors: Shonda Kuiper, Jeff Sklar
Posted Date:
Students also viewed these accounting questions
-
In this exercise, you will create a program that displays the number of daily calories needed to maintain your current weight. The number of calories is based on your gender, activity level, and...
-
In this exercise, you will create a program that displays a table consisting of four rows and three columns. The first column should contain the numbers 10 through 13. The second and third columns...
-
In this exercise, you will create a program that displays the amount of a cable bill. The amount is based on the type of customer, as shown in Figure 9-43. For a residential customer, the user will...
-
Suppose that, in a Brazilian municipality, theprobability that a randomly selected resident likessoccer is 1/4, while the probability that he likes soap operas is1/2. Determine the probability that 1...
-
A monopoly produces a good with a network externality at a constant marginal and average cost of 2. In the first period, its inverse demand function is p = 10 Q. In the second period, its demand is...
-
Blue Super giants a typical blue supergiant star (the type that explode and leave behind black holes) bas a surface temperature of 30,000 K and a visual luminosity 100,000 times that of our sun. Our...
-
Consider the IRR and ERR measures of worth. If we define a root to mean a value for the measure that results in \(\mathrm{PW}=0\), then which of the following statements is true? a. Both IRR and ERR...
-
Price and efficiency variances, journal entries. The Monroe Corporation manufactures lamps. It has set up the following standards per finished unit for direct materials and direct manufacturing...
-
When estimating the average cash interest rate, Multiple choice question. the beginning amount of interest-bearing debt is in the denominator. the average amount of interest-bearing debt is in the...
-
Using the alternative-parameter method, determine the parameters of the following distributions based on the given assessments. Refer to Step 5.5 if necessary. a. Find the parameter value for the...
-
K In the system, let p =- and q = - X 3 5 =+1=2 3X5X y 4 1 11 14 y The solution set is {. (Type an ordered pair.) Substitute, solve for p and q, and then find x and y.
-
1. Consider the principles, assumptions, and c 7. Assume you are an investor in BFA, As an investor, what type of information would you interested in viewing before making an investment in BFA? Do...
-
ABC Corp. invests $500,000 this year in a three-year project. The investment will have the salvage value of $50,000. The performance of the project over the three-year span was as follows: At Year 1,...
-
This problem involves reading in a text file of words in the English language that is too large to screenshot but would be willing to send to a tutor if possible and if that is needed named words.txt...
-
1.) Describe the supply and demand model and equilibrium as a concept, do you think that this model adequately explains some important economic concepts or do you think that it oversimplifies,...
-
From this Summary Response, what is the best thesis statement to put into introduction to introduce the response section (which is the paragraph 2) The article "Opinion: Tax the rich more? "Not So...
-
Suppose the rates of return (in %) over the past 6 years for two mutual funds are as follows: Year Fund A Fund B 1 8.3 12 2 -6.0 -4.8 3 18.9 6.4 4 -5.7 10.2 5 23.6 25.3 6 20 1.4 a. Compute the mean...
-
Identify the Critical Infrastructure Physical Protection System Plan.
-
What is the proportion of females in this study who have lung cancer? What is the proportion of smokers who got lung cancer? What is the proportion of nonsmokers who got lung cancer? What is the...
-
One misconception that some students initially have about survival analysis methods is that they can be applied only to survival data that contain some censored observations. While survival analysis...
-
Use the technology instructions provided on the accompanying CD and the data from only the BGA location to fit a Poisson regression model with the cancer count for each group as the response (Y) and...
-
A surface with \(N_{0}\) adsorption centers has \(N\left(\leq N_{0}ight)\) gas molecules adsorbed on it. Show that the chemical potential of the adsorbed molecules is given by \[ \mu=k T \ln...
-
Assuming that the latent heat of vaporization of water \(L_{\mathrm{V}}=2260 \mathrm{~kJ} / \mathrm{kg}\) is independent of temperature and the specific volume of the liquid phase is negligible...
-
Define a quantity \(J\) as \[ J=E-N \mu=T S-P V \] Show that for a system in the grand canonical ensemble \[ \overline{(\Delta J)^{2}}=k T^{2} C_{V}+\left\{\left(\frac{\partial U}{\partial...
Study smarter with the SolutionInn App