フィルターのクリア

Connect all the plots with the previous plot

3 ビュー (過去 30 日間)
Jayanta Deb
Jayanta Deb 2018 年 2 月 16 日
コメント済み: Jayanta Deb 2018 年 2 月 16 日
Hello, I am running a code within while loop(infinite) and need to plot the points in graph. Now the loops consists of a time stamp (t = t+1) and there is a reading called ESD(variable it is) and i am deriving it from some instrument. I want to plot them as real
time graph. as shown in the sample picture 1.png(but not 3 plots only one graph-that is just a sample). I am using the simple plot code to show it on graph but there it is plotting like this:
plot(t,ESD,'*') hold on grid on t =t+0.75;
So basically I want all the dots should be connected with the previous dot. Regards J

回答 (1 件)

KSSV
KSSV 2018 年 2 月 16 日
編集済み: KSSV 2018 年 2 月 16 日
As you said you are using a loop.....try to save the result into an array and at the end plot them.
N = 1000 ;
count = 0 ;
A = zeros([],1) ; % initialize the array to store point you want
while count <= N
count = count+1 ;
A(count) = rand ; % store the result
end
plot(A)
  1 件のコメント
Jayanta Deb
Jayanta Deb 2018 年 2 月 16 日
Hi, Thanks for your reply. I want to show this as a real time plotting I have to plot it at each iteration.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by