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]
4 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]4 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
1.
Hatshy [7]

Answer:

Hi!

The following Javascript statement compares if num is 2 or 5 and increment num by 1 if true.

if ( num==2 || num==5)  

num = num +1;

Explanation:

The operator == is used to compare if the operands are equal.

The operator || is OR.

  • If at least one of the operands is true then return true.
  • If all operands are false returns false.

if( num==2 || num==5) <em> // if num is equal 2 or if num is equal 5</em>

num = num +1; <em>// adds 1 to num.</em>

8 0
3 years ago
Question 11
STatiana [176]

What type of program would have a class named Student with objects called fullTime and partTime?

A. machine language program

B. object-oriented program

C. markup language program

D. procedural language program

Answer:

B. object-oriented program

Explanation:

An object-oriented program or OOP is a type of program that uses the concepts of objects and methods.

Although they are quite broad, they also make use of classes and types.

Java, for instance makes use of OOP as they use classes and objects under those classes and name them anyhow they want.

Therefore, the correct answer is B

8 0
4 years ago
Which of the following is the largest measurement for the weight of a bag of dog food?
jasenka [17]

Answer:

approximately 5 lbs but no sure weight.

6 0
3 years ago
Read 2 more answers
An output device is any hardware component that allows you to enter data and instructions into a computer
Mekhanik [1.2K]

Answer:

Explanation:

Computer accepts some data for its processing, that data is called input. The hardware component which allows user to enter data and instruction into a computer is called input device.

4 0
3 years ago
What are the atoms in grp one? periodic table. I am going to mark as brainliest ​
Maru [420]

Answer:

Atoms in group 1:

H

Li

Na

K

Rb

Cs

Fr

3 0
3 years ago
Other questions:
  • 12. Which of the following is a complex formula?
    13·2 answers
  • A​ ________ is a component in the computer system data hierarchy that includes content such as Student ID​ 100; Course IS​ 101,
    15·1 answer
  • Mike's boss told him he needs to be more efficient. Select each suggestion that will help him become more efficient at creating
    9·1 answer
  • Create a project named ClassicBookSelector that contains a Form with a ListBox that lists at least five classic books that you t
    10·1 answer
  • As a digital investigator for your local sheriff’s department, you have been asked to go with a detective to a local school that
    13·1 answer
  • Of the following choices what was the best thing to do with electronic equipment you no longer want
    7·1 answer
  • What will be the code in CSS, to set
    13·1 answer
  • What might a designer need to consider when choosing an appropriate energy source for products and power systems
    15·1 answer
  • What errors does the grammar tool find? Choose all that apply
    11·1 answer
  • Help me. thank you very much
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!