Plotting values from a double array based on information from a cell array
Show older comments
Hello,
I have created a 13 x 2 cell array that has time values in the first column and keywords in the second column. It takes the form below.
'28979.015' 'hold'
'39780.015' 'hold-end'
'39910.015' 'hold'
'49108.015' 'max-pressure-evac 60.0'
'50711.015' 'hold-end'
'50841.015' 'hold'
'58642.015' 'hold-end'
'58772.015' 'hold'
'65837.015' 'max-pressure-evac 60.0'
'65973.015' 'hold-end'
'66103.015' 'hold'
'72410.015' 'max-pressure-evac 60.0'
'73304.015' 'hold-end'
I would like to add a row underneath every 'max-pressure-evac 60.0' where in the first column a constant of 61 is added to the previous value and the second column takes on the name 'evac-end'. For example:
'49108.015' 'max-pressure-evac 60.0'
should become:
'49108.015' 'max-pressure-evac 60.0'
'49169.015' 'evac-end'
Any advice on how this can be accomplished would be greatly appreciated. Thank you in advance.
Accepted Answer
More Answers (0)
Categories
Find more on Data Types 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!