Question: I am trying to program a function in Matlab that will scale and rotate any given set of (x,y) coordinates and then shift that to

I am trying to program a function in Matlab that will scale and rotate any given set of (x,y) coordinates and then shift that to a desired location. I cant get this to work, looking for some input. Thanks  I am trying to program a function in Matlab that will

% XY is a (2xn) ma t rix of coordinates % 3F is the scaling factor t make the plot larger r smaller % r is the r tati n angle, amoun t to rotate the object % shiftx determines how many units to move in the x axis % shifty determines h w many units t move in the y axis ] function XY Lname F1 ni t ia ll.project1(XY,sF, r, shiftx, shifty)2 2 Rotation ma trix R= [c sd (r) -sind (r) ; sind (r) cosd (r) ] ; XY R XY ; % this line r tates the variables XY- SF * XY ; % this lines scales the c ordinates | XY (1, :)=XY (1, :) + shiftx; % shifts the first row in the x axis XY (2, :)-Y (2, :) + shifty; % shifts the second row in the y axis end

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!