MATLAB – zombie program

Video Posted on

iSTARzoombieframe_001

This is the main file. Change the file extension to .m. In this program, a zombie (a lazy student shown in Red) looks for the nearest targets (students shown in Yellow STARs) in the classroom and persuade them to be zombies (lazy). Surprisingly, there are only few students who can survive from the zombies. 🙂 Enjoy the programs below.

Change the extensions of the following function to .p.

initialize

This function initializes the positions of the targets (students) and zombie.

findprey

This function finds the nearest targets and convert them into zombies.

updateposition

This function updates the positions of the targets and zombies.

drawgraph

This function draws the new positions of the targets and zombies.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s