Linear algebra, matlab knowledge required, handshake required

profilepaniyu
lab_7.docx

ENGR 231 – Linear Engineering Systems

Lab 7: Pacman Game!

Your Name: _______________________ Indicate Section: 61 or 62.

As a convenience, this answer template is provided if you wish to easily submit your work. Be sure to save it as a PDF before submitting online! Only one submission is allowed.

Questions 1-2: Paste your yellow Pacman image here. Must not show the dots.

Question 3: Paste an image of your yellow Pacman with black eye here.

Questions 4-5: Anonymous functions

Question 4: After defining the anonymous function translate(dx,dy) as above, find the result of:

>> translate(1,2) * [1;0;1]

Answer:

Question 5: Show your inline code for the anonymous function rotate(d).

Paste code here:

Find the result of:

>> rotate(90) * [1;0;1]

Answer:

Answer:

Question 6: Paste an image of your completed maze here. (No dots!)

Questions 7-8: Replace this plot, with your new plot. Remember yours must have no dots! but should show the turning points, the blue jewel and the yellow Pacman.

Question 9: Paste your code for the third turning point here. Use a small font to preserve formatting.

Question 10: Paste your code for the fourth turning point here. Use a small font to preserve formatting.

When your lab is complete, be sure to submit it as a PDF by the due date – this Thursday before 11:59PM. You have one more day, to submit the lab (but with a small penalty), and then the window closes for good and your grade will be zero. Only one submission is allowed per student.

1

0 10 20 30 x

-5

0

5

10

15

20

25

30

y

Pacman Maze

0 10 20 30

x

-5

0

5

10

15

20

25

30

y

Pacman Maze