run two program(infinite loop) prallel in matlab
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lalji goti
am 16 Jan. 2014
Kommentiert: Walter Roberson
am 31 Mai 2015
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
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 16 Jan. 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 Kommentare
Walter Roberson
am 17 Jan. 2014
As I posted above:
and look down to "Defining an Asynchronous Read Callback"
Weitere Antworten (1)
Haiko
am 16 Jan. 2014
Using parfor might be a solution. Your code has to be rewriten a bit. See as well the help function on parfor.
3 Kommentare
bsissa soufien
am 31 Mai 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
am 31 Mai 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.
Siehe auch
Kategorien
Mehr zu Clocks and Timers finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!