2.0

2.0 | 1 rating Rate this file 11 Downloads (last 30 days) File Size: 3.81 KB File ID: #27359
image thumbnail

Turbo plot

by Yuval Cohen

 

24 Apr 2010

A fast replacement for the built in PLOT function. Works much faster when the data sets are large

| Watch this File

File Information
Description

TPLOT TURBO Linear plot.

TPLOT works in similar manner to PLOT but can display very large data
sets much faster. Zoom and resize are also much faster than PLOT.

TPLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
then the vector is plotted versus the rows or columns of the matrix,
whichever line up. The function asserts that X is uniformly spaced
monotonically increasing vector.
X can also be a 2 element vector [X0 X1], in which case the function
creates a uniformaly spaced vector X between these limits.
If X and/or Y are complex, the imaginary parts are ignored.

Please note that function creates and plots a set of local minima and
maxima. The use of the AXIS function after TPLOT may result in invalid
displayed data. To invoke the invoke the internal update_plot function
resize the figure or type:

zoom(1);

TPLOT(Y) plots the columns of Y versus their index.

Various line types, plot symbols and colors may be obtained with
TPLOT(X,Y,S) where S is a character string defining the linetype, marker and color (in the same manner as in the PLOT function).
 
   Example:
      N = 1e7;
      x = 0:2*pi/(N-1):2*pi;
      y = [sin(x) + randn(1,N); sin(x)];
      tplot(x,y)

The function was successfully tested with data sets of 50 million points.

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
15 Jun 2011 M. A. Hopcroft

Didn't work for me- tplot(d(:,1)), where "d" has length 22 million or so, just churns and fails to plot. I'm speculating, but it might be that the method used here of looking for local minima/maxima is not efficient for data that is not smooth.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
figure Yuval Cohen 26 Apr 2010 10:26:33
plot Yuval Cohen 26 Apr 2010 10:26:33
fast Yuval Cohen 26 Apr 2010 10:26:33
large Yuval Cohen 26 Apr 2010 10:26:33
long Yuval Cohen 26 Apr 2010 10:26:33
zoom Yuval Cohen 26 Apr 2010 10:26:33
resize Yuval Cohen 26 Apr 2010 10:26:33

Contact us at files@mathworks.com