How do you create and plots subsets of array data?

2 views (last 30 days)
Suppose I have a table of values for various events.
Event Event # Time start Time stop Velocity Acceleration
A 1 400 405 10 3
B 1 410 411 12 4
A 2 415 419 11 3.5
.... etc
I want to create a bar graph of how many times event A occurs over the whole time interval, so my questions are:
1) How do I create a subset of this table for event A with only time start and event # information?
Event Event # Time start
A 1 400
A 2 412
A 3 440
A 4 460
2) How do I create a new Time column that is in minutes and starts at 0?
Event Event # Time start Time adjusted
A 1 400 0
A 2 412 .2
A 3 440 .66
A 4 460 1
3) How do I create another subset of this data, with only data from each one minute mark?
Event Event # Time adjusted
A 1 0
A 4 1
A 7 2
4) Finally, I want to plot this data as a bar graph.

Answers (0)

Categories

Find more on Discrete Data Plots 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!