Azzera filtri
Azzera filtri

run two program(infinite loop) prallel in matlab

4 visualizzazioni (ultimi 30 giorni)
Hello,
how can i run two infinite loop parallel in matlab.
data listening infinite loop
while 1
while ~(iStream.available)
end
readS(iStream);
end
command sending infinite loop
while 1
userInput = input('Server: ', 's');
oStream.sendS(userInput);
end
how can i run this both infinite loop program parallel in matlab plz help me out

Risposta accettata

Walter Roberson
Walter Roberson il 16 Gen 2014
You should probably use a single program, with the input from the robot handled by firing a timer() object, or by using a callback, such as a BytesAvailableFcn.
  13 Commenti
Lalji goti
Lalji goti il 21 Gen 2014
finally i have achieved.. thanks for your kind help. my project is complete..
thank you very very much

Accedi per commentare.

Più risposte (1)

Haiko
Haiko il 16 Gen 2014
Using parfor might be a solution. Your code has to be rewriten a bit. See as well the help function on parfor.
  3 Commenti
bsissa soufien
bsissa soufien il 31 Mag 2015
hi I can modify a spin protocol source code in wireless sensor network domain to optimize energy and diminier connsommation and here is the source code of spin protocol:
Walter Roberson
Walter Roberson il 31 Mag 2015
The source did not end up attached. But this would not be the right Question to attach it to as the Question does not pertain to WSN.

Accedi per commentare.

Categorie

Scopri di più su Application Deployment 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!

Translated by