Continually updating graph/ Dynamic Graph/ Live Graph

21 ビュー (過去 30 日間)
Basit
Basit 2019 年 7 月 15 日
編集済み: KALYAN ACHARJYA 2019 年 7 月 15 日
I am able to continually extract a value from my Raspberry Pi (every 5 seconds) and store it into MATLAB workspace as variable A (over-writes the previous value of A every 5 seconds). Now I would like to plot a graph where A is on the y-axis and time is on the x-axis and it is continually plotting the updated value of A (every 5 seconds) until I stop the program.
Is there anyway to do this? If so, what would the code be to accompish this?

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 7 月 15 日
Yes, you can do that. Use linkdata, which allows automatically update graphs when variables change.
  2 件のコメント
Basit
Basit 2019 年 7 月 15 日
But I am looking for my x-axis (time) to go from 0 to infinity, while plotting the y-axis (value of A) every 5 seconds. Could you please give an example of similar code?
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 7 月 15 日
編集済み: KALYAN ACHARJYA 2019 年 7 月 15 日
I am looking for my x-axis (time) to go from 0 to infinity
use tic toc to get the time, then update the graph with respect to A value. Please wait for experts commnets or other answer.

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

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by