Borrar filtros
Borrar filtros

running two tasks simultaneously

4 visualizaciones (últimos 30 días)
Hamza Ashraf
Hamza Ashraf el 25 de Sept. de 2020
Respondida: Jayant el 27 de Abr. de 2021
hi am working on a project that requires running two tasks simultaneosuly.
task 1. %infinite while loop which constantly records audio data and detects for ambulance and stores result in a variable
task 2. % again infinite loop which is processing some images and gives output to arduino and switch traffic signals according to results
task 1 is independent. But task 2 requires data form task 1 so that it can gives output to arduino if an ambulance is detected and perform assigned action according to ambulance detection
can anyone help me how can i perform both tasks in parallel at the same time.

Respuestas (1)

Jayant
Jayant el 27 de Abr. de 2021
its bit late, but still...
You can definitely use 'timer' function in this scenario. create timer for your task 1, for 1 second let us say. and run task 2 in infinite loop.

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by