Graph with stripes in different colors based on 1D array that contain strings which indicate colors
Show older comments
Dear Matlab users
I have 1x3600 array that contain strings such as “B”, “G”, “Y” or “R” that correspond to certain color. In example “B” = BLUE, “G” = GREEN, “Y”=YELLOW, “R”=RED. In fact one string represent 1 second. In example 3 strings “B” means 3 blue seconds, 5 strings “R” means 5 red seconds, etc. On this picture you can see how the array looks like.
I need to create graph that will looks like the graph on this picture. As you can see at x axis should be values from 1 to 3600 with 1 second interval.

Please let me know...how to do this in Matlab? Thank you in advance.
Answers (0)
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!