1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
PtichkaEL [24]
3 years ago
13

Using Matlab programming I need to rotate the line defined by x,y by 45 degrees around 2,2

Computers and Technology
1 answer:
belka [17]3 years ago
4 0

Answer:

% here x and y is given which we can take as

x = 2:2:10;

y = 2:2:10;

% creating a matrix of the points

point_matrix = [x;y];

%  center point of rotation  which is 2,2 here

x_center_pt = x(2);

y_center_pt = y(2);

% creating a matrix of the center point

center_matrix = repmat([x_center_pt; y_center_pt], 1, length(x));

% rotation matrix with rotation degree which is 45 degree

rot_degree = pi/4;      

Rotate_matrix = [cos(rot_degree) -sin(rot_degree); sin(rot_degree) cos(rot_degree)];

% shifting points  for the center of rotation to be at the origin

new_matrix = point_matrix - center_matrix;  

% appling rotation  

new_matrix1 = Rotate_matrix*new_matrix;          

Explanation:

We start the program by taking vector of the point given to us and create a matrix by adding a scaler to each units with repmat at te center point which is (2,2). Then we find the rotation matrix by taking the roatational degree which is 45 given to us. After that we shift the points to the origin and then apply rotation ans store it in a new matrix called new_matrix1.

You might be interested in
On hearing my name, you may think that I am iterative, but I play a vital role in networking by boosting the signal strength to
natka813 [3]

Answer:

A Repeater

Explanation:

A Repeater takes a signal, and then repeats it - in order to boost it.

Iteration is also the repetition of something, which sounds like what a repeater would do.

4 0
3 years ago
Three common risk factors for young drivers and how you plan to minimize these factors.
djverab [1.8K]

Answer: making a simple mistake which ends in someone getting hit or close to being hit like not turning on your signal light

going too fast which makes it more difficult to make turns properly

if the car is a manual trying to start on a hill and rolling backwards into a car

Drivers ed and practicing in a parking lot or something or the sort

Explanation:

7 0
3 years ago
What is the biggest disadvantage of copying a worksheet into another workbook?
san4es73 [151]
The answer is B)The worksheets may not work in the new workbook.
7 0
3 years ago
The primary key is a field that uniquely and completely identifies a record.
Leokris [45]
True

----------------------------------
6 0
3 years ago
Read 2 more answers
What is the value of the variable phones after the execution of the following code? phones = {'John': '5555555', 'Julie' : '7777
uysha [10]

Answer:

phones = {'John': '1234567', 'Julie' : '7777777'}

Explanation:

In the code given in the question phones dictionary contains contains two keys John and Julie and have the values '5555555' and '7777777' respectively. Now in the code the key John in the dictionary phones is assigned the value '1234567' .So the value corresponding to the key John becomes '1234567'.

3 0
3 years ago
Other questions:
  • Which letters appear in the home row on a keyboard?
    14·2 answers
  • Explain why testing can only detect the presence of errors, not their absence.
    14·1 answer
  • We want to construct a memory with 256 bytes in capacity. Assume that each byte has a unique address. (a) How many address lines
    14·1 answer
  • All users on the network have antivirus software; however, several users report that they have what an administrator described a
    10·1 answer
  • I NEED HELP ASAP!
    6·2 answers
  • How do computer users benefit from the increased speed?
    9·1 answer
  • Meaning and explanation of fortran​
    11·2 answers
  • In PowerPoint, a picture might be a photograph, a shape you draw, a piece of clip art, or an illustration created using a graphi
    7·2 answers
  • Use the drop-down menus to describe the customize ribbon dialog box.
    11·1 answer
  • Say true or false
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!