Conditional marker on stream time series data plotting

조회 수: 1 (최근 30일)
Arijit
Arijit 2014년 3월 5일
댓글: per isakson 2014년 3월 5일
I like to mark in a stream time series data when data value equals to a threshold. Whenever such value is reached in a streaming time series plot the marker will appear and then streaming will go on with the marker. I have modified code from http://www.mathworks.in/matlabcentral/answers/87466-real-time-plot-from-streaming-data as:
t = 0 ; x = 0 ; startSpot = 0; interv = 1000 ; % considering 1000 samples step = 0.1 ; % lowering step has a number of cycles and then acquire more data while ( t <interv ) b = sin(t)+5; x = [ x, b ]; plot(x) ; if ((t/step)-500 < 0) startSpot = 0; else startSpot = (t/step)-500; end axis([ startSpot, (t/step+50), 0 , 10 ]); grid t = t + step; drawnow; pause(0.01) end
But this is not working as intended????
  댓글 수: 1
per isakson
per isakson 2014년 3월 5일
Try to markup the code. Select the code and click the button [{}Code].

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by