Storing listbox values as vector.

1 visualización (últimos 30 días)
Minh Le
Minh Le el 29 de Nov. de 2015
Comentada: Jan el 29 de Nov. de 2015
I'm doing a project about simulation of an elevator. I have created a listbox to list the floors that users can choose to go to. I want to store the values of a listbox to a vector so that I can execute the vector in proper order.
For example, the first person selects floor 3, the second person selects floor 1. Then the vector will be [3 1], thus, I can open the door on the 3rd floor and then the 1st floor.
Thank you for your help.
  2 comentarios
Walter Roberson
Walter Roberson el 29 de Nov. de 2015
That is not how elevators work. If a floor is selected that is in the current direction of travel and the newly selected floor is the closest floor to where the elevator is out of all the floors in the list, and it is safe to stop at the floor considering the speed of the elevator, then the floor will be the first one stopped at, not the last one stopped at which is what your programming would do.
Jan
Jan el 29 de Nov. de 2015
You describe a FIFO buffer. Beside the fact that this is an unusual (but possible) method for an elevator, you did not ask a specific question. So how can we help you? What have you tried so far? Which problems occur?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by