フィルターのクリア

run two program(infinite loop) prallel in matlab

4 ビュー (過去 30 日間)
Lalji goti
Lalji goti 2014 年 1 月 16 日
コメント済み: Walter Roberson 2015 年 5 月 31 日
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

採用された回答

Walter Roberson
Walter Roberson 2014 年 1 月 16 日
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 件のコメント
Walter Roberson
Walter Roberson 2014 年 1 月 17 日
As I posted above:
and look down to "Defining an Asynchronous Read Callback"
Lalji goti
Lalji goti 2014 年 1 月 21 日
finally i have achieved.. thanks for your kind help. my project is complete..
thank you very very much

サインインしてコメントする。

その他の回答 (1 件)

Haiko
Haiko 2014 年 1 月 16 日
Using parfor might be a solution. Your code has to be rewriten a bit. See as well the help function on parfor.
  3 件のコメント
bsissa soufien
bsissa soufien 2015 年 5 月 31 日
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 2015 年 5 月 31 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by