Comet command - change colour and speed

41 views (last 30 days)
Hey guys!
Is there a way to change the colour and speed properties of the comet command ?
Any help is appreciated.

Answers (1)

Keyhan Kouhkiloui
Keyhan Kouhkiloui on 22 Apr 2019
Edited: Keyhan Kouhkiloui on 22 Apr 2019
Hey, Hi,
I found one easy way of changing the colour property in comet command. Copy and past the comet script in the folder that you have your data and rename it.
Go to the script of comet (renamed by you), just simply go to line representing the << if size(co,1)>=3 >> and replace: colors = [ co(1,:);co(2,:);co(3,:)]; with colors = [ 'r';'b';'g']; in the following line. (I used red, blue and green for my personal performance of the comet command, you can change it to any color supported by MATLAB in the following link: https://uk.mathworks.com/help/matlab/ref/colorspec.html)
I am still working on finding a way to put maybe time delay in the windows updating process, as drawnow is a built-in command in MATLAB. I'd let you know if I could find a reasonable way of doing it.

Categories

Find more on Animation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!