running Multiple Functions, in Parralel in Matlab for Arduino or Ardruino Itself ?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Babacar Dieng
il 2 Ott 2021
Risposto: Babacar Dieng
il 8 Ott 2021
I want to do the following and have them run in parralll
if (condition A==True) {
function_a() ;
function_b() ;
function_c() ;
}
where functions_a() and function_b() have the same duration which is longer than the duration of function_c() .
0 Commenti
Risposta accettata
Shravan Kumar Vankaramoni
il 6 Ott 2021
Hi,
You can use simple PARFOR to execute those functions simultaneously as long as they don't interact with each other. Below is the example code
matlabpool open 3
parfor i = 1:3
if i == 1
function_a()
elseif i == 2
function_b()
else
function_c()
end
end
Refer the following link for more information on this
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!