Thank you so much for the file!!! I was wondering if the code can be tweaked to show multiple comets with the same y-value at any give time (as opposed to this version where the comet heads are located on a hypothetical vertical line and have the same x-value at any given time)?
Glad it was helpful! I am aware of your problem but can't think of an easy way to fix it. I based the function on the MATLAB built-in comet.m so it carries over all of those issues. I'd just use it for rough visualization within MATLAB