# MATLAB Script thatthat Builds a Simulation Domain.

Question

This problem examines the use of interlinked data structures similar to what might be found in simulation or a game. Consider a simulation of vehicles moving over a terrain where the type of terrain affects the speed of the vehicle. There are multiple types of vehicles each with a different maximum speed. There are three types of terrain: Sand, Grass, and Road. The simulation takes place on N x N grid. a) Develop and describe a set of data structures or classes that support the attributes described above. Indicate their interrelationships via a class diagram.

b) Write a script that builds a simulation domain of 20 x 20 with a default terrain of grass. Put a road in from (5,1) to (5,20) and sand at (5,10) after the road has been laid in. Write out the data structures to a file.

c) Write a script that reads the data structures from a file and displays the map in a 2D plot. Grass should be plotted as green, sand yellow, and the road blue.

Summary

This question belongs to MATLAB software and discusses about application of MATLAB in operations management and to write a script that builds a simulation domain and reads the data structures from a file and displays the map in a 2D plot.

• Rasha

this is a very good website

• maani

I have 50 questions for the same test your page is showing only 28

• joeanne

• joeanne

hi can anyone help or guide me to my assignments. thanks

• Monik

• Cristina

This solution is perfect ...thanks

• Janete

Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes

• Sandeep

Perfect bank of solution.

• Oxana

great !

• Paul Brandon-Fritzius

thanks for the quick response. the solution looks good. :)

• tina Johnson

thnx for the answer. it was perfect. just the way i wanted it.

• Giuseppe

works fine.