Code covered by the BSD License  

Highlights from
StripChartXY

Be the first to rate this file! 19 Downloads (last 30 days) File Size: 3.62 KB File ID: #30647
image thumbnail

StripChartXY

by

 

Scrolling XY plot to display streaming data.

| Watch this File

File Information
Description

Displays streaming data - you determine the number of points to show and new points move the curve to the left.

Very similar to StripChart.m, but useful if you care about the actual x-values of the data.

Acknowledgements

Strip Chart inspired this file.

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
14 Nov 2013 Nathan Tomlin

Hi Clayton, I think either method should be the same, using :nPts or :end. I use it regularly showing 10,000 pts without problems, but mostly on older versions of matlab. I'm not sure why you get an error...

06 Nov 2013 Clayton Chu

Nice work! I found a bug, I think. The update block has the lines `xnew = new(end-nPts+1:nPts)` and `ynew = ynew(end-nPts+1:nPts)` when `nPts > length(xData)`. The comment says that we only keep the last part of the data when there is more new data than original. Should the vectors extend to `end` instead of `nPts`? I was getting some errors when trying to update large vectors to the stripchart. This could be an upstream problem since you've essentially forked from a different Stripchart function.

Contact us