Borrar filtros
Borrar filtros

two trigger events, can specify in different color

1 visualización (últimos 30 días)
Amirah Algethami
Amirah Algethami el 4 de Feb. de 2023
Respondida: Swaraj el 8 de Mzo. de 2023
Hi there;
My Q. is : I have to use 2 event values (A or B) to stop the dynamic in matlab , Can I distunguish between them if the dynamic stopped because of A or B event?
Any effort to help is appreciated.
Thanks
Amirah
  1 comentario
Chris
Chris el 4 de Feb. de 2023
The answer is probably yes, but can you please post a working code example, so we know exactly what you're trying to do?

Iniciar sesión para comentar.

Respuesta aceptada

Swaraj
Swaraj el 8 de Mzo. de 2023
Yes, you can distinguish between the two events “A” and “B” in MATLAB by using the “eventData” input argument of the event function.
When an event occurs, the event function is called with two input arguments: the current time and the “eventData” structure. The eventData” structure contains information about the event that triggered the function, including the name of event.
See the documentation below:

Más respuestas (0)

Categorías

Más información sobre MATLAB 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