필터 지우기
필터 지우기

Real Time Plot Not Smooth Enough

조회 수: 2 (최근 30일)
Bolin
Bolin 2014년 10월 19일
답변: Star Strider 2014년 10월 19일
Hi Guys
I have written a real time plotter that plots 128 samples I receive from an EEG headset, one sample at the time and attached is the result.
Obviously, since I'm plotting one point at a time, it is not going to be continuous enough.
Is there anyway to do real time interpolation to some how connect these dots?
If not, how do people produce real time plots that are continuous (smooth or jagged doesn't matter)?
  댓글 수: 2
Rick Rosson
Rick Rosson 2014년 10월 19일
Please post your code.
Bolin
Bolin 2014년 10월 19일
Let's 'h' be the object we wish to query
for Seconds = 1:5
for Samples = 1:128
Channel_1 = h.data(Samples,4);
Channel_2 = h.data(Samples,5);
subplot(2,1,1)
plot(i+Seconds*128,Channel_1,'--r','LineWidth',1.8), axis([0 640 2000 8000])
hold on
grid on
subplot(2,1,2)
plot(i+Seconds*128,Channel_2,'--g','LineWidth',1.8), axis([0 640 2000 8000])
hold on
grid on
drawnow
end
end

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

채택된 답변

Star Strider
Star Strider 2014년 10월 19일
To produce a line that appears continuous, change your plots to:
plot(i+Seconds*128,Channel_1,'-r','LineWidth',1.8)
plot(i+Seconds*128,Channel_2,'-g','LineWidth',1.8)
The '--' linetype will plot a dashed line, the '-' linetype will plot a continuous one.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Biomedical Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by