Similar to the MATLAB routine comet3. It takes x, y, and z line data and creates a comet plot. The user can control the tail length, playback speed (frequency), and all the usual line parameters as a normal plot.
See function help for an example.
@Yusuf, please check out my submission at https://www.mathworks.com/matlabcentral/fileexchange/49153-3d-comet-plot-of-multiple-objects .
It is plotting juts one variable. Are there any option for plot multiple variable at one graph?