running Multiple Functions, in Parralel in Matlab for Arduino or Ardruino Itself ?

조회 수: 1 (최근 30일)
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() .

채택된 답변

Shravan Kumar Vankaramoni
Shravan Kumar Vankaramoni 2021년 10월 6일
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
  댓글 수: 1
Babacar Dieng
Babacar Dieng 2021년 10월 6일
Thanks.
but once i write the function on Matlab, how can i transfert it to Ardruino?
Or i have to stick to Matlab for the hole project.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Babacar Dieng
Babacar Dieng 2021년 10월 8일
how do i transfer the matlab code to ardruino

카테고리

Help CenterFile Exchange에서 Parallel Computing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by