Read data in real time. Shell command to matlab ?

4 ビュー (過去 30 日間)
RogerLM
RogerLM 2016 年 7 月 15 日
コメント済み: RogerLM 2016 年 7 月 15 日
Hi,
I am sending data from the iPhone to the shell command (using nc), I would like to read those data in matlab and plot it.
I used Serial, but this ask me a 'PORT' and I don't have one. So I don't know how to proceed. I don't find the answer on the net, probably someone already needed the same but I don't find it.
Thank you for your help.

採用された回答

Walter Roberson
Walter Roberson 2016 年 7 月 15 日
If you have the Instrument Control Toolbox, just use tcp() directly instead of receiving by netcat. If you do not have that toolbox, look in the File Exchange for tcpudpip()
If you want to stick to netcat then you need to send its output to a file, and you need to open the file and read from it, instead of trying to use a serial port. Depending on your operating system and exact needs, you might want to write to a fifo (created with mkfifo) instead of a file.
  1 件のコメント
RogerLM
RogerLM 2016 年 7 月 15 日
Great. I have the Instrument Control Toolbox and it works perfectly. Thank you !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Acquisition Toolbox Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by